28 Matching Annotations
  1. May 2019
  2. develop.spacemacs.org develop.spacemacs.org
    1. Set the layer variable org-projectile-file to the filename where you want to store project-specific TODOs. If this is an absolute path, all todos will be stored in the same file (organized by project), whereas if it is just a single filename, todos will be stored in each project root. (setq-default dotspacemacs-configuration-layers '((org :variables org-projectile-file "TODOs.org")))

      could use dir_locals to set it per project?

    1. I want to stop putting comments in my code. I want it to be first-class for my code to be in the left pane and my comments to be in the right pane, always binded together with anchors but always separate so my comments don't have to adhere to the limitations of the code's text area.

      emacs--annotate.el

  3. Jan 2019
    1. --with-cocoa

      As of today, at least:<br> Warning: emacs: this formula has no --with-cocoa option so it will be ignored!

    1. If you are using an operating system that uses the systemd service manager (which nowadays includes most GNU/Linux distributions), then the best solution might be to use systemd to start your Emacs daemon on boot. You can do this by creating a file $HOME/.config/systemd/user/emacs.service with the following contents:

      $HOME/.config/systemd/user/emacs.service

    2. ‘-a COMMAND’ ‘--alternate-editor=COMMAND’ Specify a command to run if ‘emacsclient’ fails to contact Emacs. This is useful when running ‘emacsclient’ in a script. As a special exception, if COMMAND is the empty string, then ‘emacsclient’ starts Emacs in daemon mode (as ‘emacs --daemon’) and then tries connecting again. ‘-c’ ‘--create-frame’ Create a new graphical “client frame”, instead of using an existing Emacs frame. See below for the special behavior of ‘C-x C-c’ in a client frame. If Emacs cannot create a new graphical frame (e.g., if it cannot connect to the X server), it tries to create a text terminal client frame, as though you had supplied the ‘-t’ option instead. ‘-t’ ‘--tty’ ‘-nw’ Create a new client frame on the current text terminal, instead of using an existing Emacs frame. This behaves just like the ‘-c’ option, described above, except that it creates a text terminal frame (*note Non-Window Terminals::).

      ‘-a COMMAND’ ‘--alternate-editor=COMMAND’

      Specify a command to run if ‘emacsclient’ fails to contact Emacs. This is useful when running ‘emacsclient’ in a script.

      As a special exception, if COMMAND is the empty string, then ‘emacsclient’ starts Emacs in daemon mode (as ‘emacs --daemon’) and then tries connecting again.

      ‘-c’ ‘--create-frame’

      Create a new graphical “client frame”, instead of using an existing Emacs frame.

      See below for the special behavior of ‘C-x C-c’ in a client frame.

      If Emacs cannot create a new graphical frame (e.g., if it cannot connect to the X server), it tries to create a text terminal client frame, as though you had supplied the ‘-t’ option instead.

      ‘-t’ ‘--tty’ ‘-nw’

      Create a new client frame on the current text terminal, instead of using an existing Emacs frame.

      This behaves just like the ‘-c’ option, described above, except that it creates a text terminal frame (*note Non-Window Terminals::).

    3. I do this by starting an emacs daemon when I login. Where you put this command depends on your desktop manager. I use i3, which is configured to run a script on login that includes the following: emacs --daemon & With that, emacs is always running in the background, and I open a new client with emacsclient -c -n, bound to a convenient keybinding in the window manager. If you're working in a terminal, you only need a simple alias like alias emc='emacsclient', possibly with -n, -c or -t arguments, depending on how you use it. Do check out the options for emacsclient in the manual: ((emacs) emacsclient Options, accessible from Emacs by C-h r m emacsclient options <enter>). You can use the -a flag to automatically start an emacs daemon if it isn't running already, and -c or -t to open a new frame or terminal client, rather than reusing an existing one (in the same session):
    4. Since emacsclient can handle long package loading time proerly, I really want to keep at least one emacs process, and most of the time only one emacs process, open as a background process and better hide GUI. Right now I defined the following function in .bashrc: emc () { if [[ $# -eq 0 ]]; then emacs --eval "(suspend-frame)" & return fi args=($*); setsid emacsclient -c -e "(find-file \"${args[*]}\")" } And also have the following line in .bashrc: emc So everytime I open up a shell, I will end up having a new emacs process. The problem is I will have many additional unnecessary emacs process after opening up many shells. However, I only want to maintain one single emacs process all the time from startup better hide GUI.
    5. Emacsclient: One single emacs process all the time from start up & never close & better hide GUI
  4. Nov 2018
    1. The keybindings for movement by word in Emacs is almost the same as that of movement by character, but instead of the prefix C- it is M-. To move forward one word use M-f; and to move backward one word use M-b.
    2. I recommend adding this to your .emacs, as it makes C-n insert newlines if the point is at the end of the buffer. Useful, as it means you won’t have to reach for the return key to add newlines!(setq next-line-add-newlines t)
    3. The four fundamental movement keys are C-n, for next logical line; C-p, for previous logical line; C-f for move forward by character; and C-b for move backward by character
    1. I update from within Spacemacs by opening a file from .emacs.d, usually the readme file.SPC g s to open Magit client, F to bring up the pull menu, -r to set rebase to true, o to pull from origin.  Then I restart Spacemacs with SPC q r.Then I update the .spacemacs file from template.  And then update packages from the link on the Spacemacs home buffer SPC b h (edited)

      update procedure for spacemacs

  5. Oct 2018
    1. It became policy to avoid abbreviations in most cases. In ZWEI, we made a list of several words that were used extremely often, and established 'official' abbreviations for them, and always used only those abbreviations. ... Words not on this list were always spelled out in full.

      abbreviations whitelist - good programming practice!

    2. The use of the mouse is still considered experimental. We know of several editors which depend highly on the use of a mouse for input, but we are not convinced that it is better than a keyboard; after more people start using ZWEI, it will be interesting to see how many of them make heavy use of the mouse and how many hardly use it at all.

      mouse considered experimental mouse better than keyboard?

    3. Since ZWEI is written in Lisp and lives in the Lisp environment of the Lisp machine, it is in a very good position to interface closely with other elements of that environment.

      living system interacting with a running lisp machine

    4. ZWEI is display-oriented: the text the user is editing is actually displayed (this is relevant because many editors of the time often showed out-of-date text due to efficiency and bandwidth restrictions, putting the burden on the user to imagine what their text looks like currently).

      bandwith restrictions -> out of date text -> user has to imagine what it currently looks like

  6. Apr 2018
    1. for ($1;$2;$3) { `yas-selected-text`$0 }

      Selected Text yas-selected-text

    2. M-x yas-visit-snippet-file, key binding: C-c & C-v Prompts you for possible snippet expansions like yas-insert-snippet, but instead of expanding it, takes you directly to the snippet definition's file, if it exists.

      Visit Snippet '''emacs-lisp M-x yas-visit-snippet-file

      C-c C-v '''

    3. M-x yas-new-snippet, key bindind: C-c & C-n Creates a new buffer with a template for making a new snippet. The buffer is in snippet-mode (see below). When you are done editing the new snippet, use C-c C-c to save it.

      Create New Snippet

      '''emacs-lisp M-X yas-new-snippet

      C-c C-n '''

    1. | 4.0 | 12.0 | 9.0 | 7.810249675906654 |

      No result block is generated

    2. #+NAME: roots_of_list #+BEGIN_SRC python :var lst=cubes :results list import math return [ math.sqrt(n) for n in lst ] #+END_SRC

      This block runs as expected

    3. #+CALL: roots_of_list( lst='(16 144 81 61) )

      But the roots_of_list recall here Throws the error: lst not found in this buffer

  7. Aug 2017
  8. Oct 2016
  9. Jun 2016
    1. @Component

      If using emacs tide-mode, customize variable tide-tsserver-process-environment to include --experimentalDecorators.

  10. Oct 2015
  11. Aug 2015