- function vs command : commands are interactive functions
- variable and option : options are customizable variables
C-h v
: describe variables and optionsC-h f
: describe functions and commandsC-h k
: describe keylast-command
: variable containing the last commandthis-command
: variable containing the command being executed- mark : the mark is generally interactively set with C-SPC
C-u C-SPC
(orC-u C-@
) : cycle through the local mark ringC-x C-SPC
(orC-x C-@
) : cycle through the global mark ring- selection : the selection is not necessarily highlighted
- region : the selection is not necessarily highlighted
(transient-mark-mode 1)
: toggle the highlighting of the region- M-x customize-face RET region : set the “region” face
C-x r t
:string-rectangle
: insert text at the beginning of the regionC-M-\
:indent-region
C-l
:recenter
C-M-f
: forward sexpC-M-b
: backend sexpC-M-a
: beginning of defunC-M-e
: end of defunC-M-k
: kill sexpC-M-@
: mark sexp
M-RET
/M-<up/down>
/M-<left/right>
C-c C-t
: add TODO keywordsS-<left/right>
: switch TODO keywordsC-u C-c C-c
: on lists, add/remove checkboxesM-h
(then repeat) : select current elementC-h v org-special-ctrl-a/e RET
(t is a good choice)<s
at the beginning of a line to insert code blockC-h org-src-fontify-natively RET
(t is a good choice)C-c ^
:org-sort
(in lists, tables, subtrees, buffer)M-<up/down>
to move up/down paragraphsC-x C-e
to eval the sexp (both in emacs-lisp-mode and org-mode)
C-s C-w
: to search for the word at pointC-s M-e
: to edit the current search stringC-s M-p/n
: browse the search historyC-s C-M-i
: complete over the search historyC-s M-s r
: toggle regexp search (very handy!)C-s M-s o
: run occur on the current search stringC-s M-s c
: toggle case-foldingC-s M-s SPC
: toggle whitespace lax search
M-x dired RET
m
to mark filest
to toggle marksC-x C-q
to toggle read-only modeQ
to replace-regexp in selected filesM-x find-grep RET
: run find and exec grepM-x rgrep RET
: recursively grep
- introduction to the re syntax
- use within
re-search-forward
Exploring interactive.
C-x n n
:narrow-to-region
C-x n s
:narrow-to-subtree
C-x n w
:widen
save-match-data
M-x edebug-defun RET
Check https://bzg.fr/en/learn-emacs-lisp-in-15-minutes.html/
What’s new in this tutorial:
lisp-interaction-mode
switch-to-buffer-other-window
get-buffer-create
erase-buffer
insert
format
(progn (+ 1 2) (+ 3 5))
(setq myliste '(1 2)) (push 0 myliste)
(mapcar (lambda(s) (1+ s)) '(1 2))
(mapconcat (lambda(s) (concat s "@")) '("a" "b" "c") "-")
while
replace-match
add-text-properties
other-window
car
,cdr