M-up
M-down
:: Highlight the list to sort using C-space and movement keys
C-c ^ o
:: Place the cursor anywhere in checklist
C-c ^ x
C-c C-d
M-x revert-buffer
C-c C-t
C-c C-c
(I use checklists below TODOs)[%]
to the end of a parent todo (one that has a checklist as children) for org-mode to show completion percentage of childrenS-RightArrow
C-c C-x C-a
M-S-RET
(this doesn’t work in my setup, not sure why, but for now I’ll type the new [ ]
)References:
https://orgmode.org/guide/Plain-Lists.html
https://orgmode.org/manual/TODO-Basics.html
https://orgmode.org/manual/Checkboxes.html
Move previous, next, forward, back with C-p, C-n, C-f, C-b
Move to beginning of line, end of line with C-a, C-e
Delete current line with C-a C-k C-k
Move forward, back by full words M-f, M-b
Move down, up by paragraph with C-{, C-}
Search forward, back with C-s, C-r
Add this to .emacs to leave the cursor where the matched string starts instead of ends:
(add-hook 'isearch-mode-end-hook
(lambda () (when isearch-forward (goto-char isearch-other-end))))
From the comments here: https://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html
Highlight with C-space, then move around
Copy highlight with M-w, paste with C-y
Reason for switching away from org-mode: Getting the html export styling that
I want requires too much markup in my text notes. I’m the primary user of the
notes and want to be able to cat and grep them without a bunch of markup
confusing the text content. Using markdown and pandoc instead.
Prefix bindings with C-c
Sequences consisting of C-c and a letter … are the only sequences reserved for users
https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html
Use global-set-key in ~/.emacs
:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Commands.html
M-: (org-version)
or
M-x org-version
I’m using 9.5.5 on emacs-plus@28
With evil disabled I rely on the undo-tree package, which is incredible.
I’m using undo-tree’s less ergonomic mapping, because something on my mac is
intercepting the more ergonomic mapping of C-/
in Term.
In Aquamacs:
undo: C-/
redo: C-?
In emacsplus:
undo: C-_
redo: M-_
Visualize and navigate history: C-x u
https://www.utm.edu/staff/jguerin/resources/utilities/emacs.html
Eval on minibuffer: M-:
Eval in source: C-x C-e
Eval full buffer: M-x eval-buffer
Add (evil-set-undo-system 'undo-redo)
to ~/.emacs
See what a key command is bound to
C-h k
Get a description of a variable
M-x describe-variable
> start typing a variable and hit tab for options
> use term’s cmd-f to search through variable names
Open the build in tutorial
C-h t
BEGIN_SRC
)Start a line with :
Install Ivy
Install Projectile
Add this to ~/.emacs
(require 'projectile)
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(setq projectile-completion-system 'ivy)
(projectile-mode +1)
Open fuzzy search with C-c p f
Open grep with C-c p s g
See other usage here: https://docs.projectile.mx/projectile/usage.html#basic-usage
Open file without fuzzy search with C-x C-f
https://web.physics.utah.edu/~detar/lessons/emacs/emacs/node2.html
Missing from this is the messages buffer, where error messages appear
Open the messages buffer with C-h e
Switch back to main buffer with C-x o
If messages buffer is highlighted, close it with C-x 0
If messages buffer is not highlighted, close it with C-x 1
cycle all folds: S-TAB
open/close a single fold: TAB
^ this does not work with evil. A workaround is to create a key mapping for 'org-cycle
C-x C-i
, then use arrow keysM-S-ArrowKey
Install aquamacs
Install evil https://github.com/emacs-evil/evil
Also trying this version (I use a different color background to remind my fingers not to use vim bindings):
brew tap d11frosted/emacs-plus
brew install emacs-plus --with-native-comp
emacs -nw <filename> -bg '#333388'
Also trying spacemacs by following instructions for macos here:
https://github.com/syl20bnr/spacemacs#prerequisites
Move ~/.emacs and ~/.emacs.d to backup locations before attempting this
I returned to using vanilla emacs-plus after trying spacemacs.
I also returned to vanilla emacs without evil.
Evil was interfering with org-mode folding.
C-x C-s
C-g
C-x b *scratch*
^ let go of control
Three options:
1. Open a file with an .org
extension
2. Open a file that contains # -*- mode: org -*-
as the first line
3. Execute M-x org-mode
M-x list-packages
M-x list-packages
:: scroll to the very bottom (use the ‘end’ key)
Look for the org
package in the list of installed packages using method above
q
C-s
search down with C-s
search up with C-r
C-c C-e h o
Relevant sections of org docs:
https://orgmode.org/org.html#Org-Syntax
https://orgmode.org/org.html#Exporting
https://orgmode.org/manual/HTML-specific-export-settings.html
Prepend file with:
#+OPTIONS: \n:t
M-x org-toggle-link-display
Use this to publish a project:
(require 'ox-publish)
(setq org-publish-project-alist
'(("org-notes"
:base-directory "~/notes/"
:include ("index.txt" "certbot.txt" "emacs.txt")
:base-extension "dummy"
:publishing-directory "~/notes/publish_html/"
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4
:auto-preamble t
)))
(org-publish "org-notes" t)
:: Navigate to the final parentheses on each line and C-x C-e
:: Or use `M-x eval-buffer` to evaluate all expressions
References:
https://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html
https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Eval.html