C-o
: open-line- macro
M-|
:shell-command-on-region
(region-beginning)
(region-end)
- macros
funcall
apply
(completing-read "Prompt: " '("alice" "bob" "eva"))
(read-from-minibuffer "Prompt: ")
(read-regexp "Your regexp: ")
regexp-quote
(regexp-opt '("abc" "bcd"))
read-char
bolp
(beginning of line?)eolp
(end of line?)
Variables:
timer-list
timer-idle-list
~$ git clone git://git.savannah.gnu.org/emacs.git
org-table-create
org-table-import
(csv, tsv)TAB
andS-TAB
S-RET
C-c .
S-M-left
: delete the columnS-M-right
: insert a new columnC-c {
: activate the table formulas debuggerS-M-up
: delete the lineS-M-down
: insert a new line- info:org#The spreadsheet
C-c =
: column formulaC-u C-c =
: field formula- references
- formulas debugger
- remote ref
shell:du -h
elisp:(message “yo”)
Check org-confirm-elisp-link-function
and
org-confirm-shell-link-function
.
See Babel.
(setq x 3)
(setq x 3 y 4)
(inc x)
;; => 4
(macroexpand '(inc x))
;; => (setq x (1+ x))
;; (inc x) <=> (setq x (1+ x))
(defmacro inc (var)
(list 'setq var (list '1+ var)))
;; (inc2 x) <=> (inc x)
(defmacro inc2 (var)
`(setq ,var (1+ ,var)))
(inc2 x)
(macroexpand '(inc2 x))
(defmacro let-a-3 (&rest body)
`(let ((msg "hello"))
,@body))
(let-a-3 ;; msg is always defined
(message "blabla")
(sit-for 2)
(message msg))
;; => 5
See org-preserve-lc
for a use of ,@body.
global-mode-string
(a list!)force-mode-line-update
- dblock in org-mode
(setq org-support-shift-select t)
(setq use-dialog-box nil)
(define-key global-map "\M-Q" 'unfill-paragraph)
obarray
intern
benchmark-run
defface
shell-command
org-caldav-sync
(setq org-export-with-broken-links t)
#+BEGIN: clocktable :maxlevel 2 :scope file
#+CAPTION: Clock summary at [2016-07-22 ven. 16:00]
| Headline | Time |
|------------+------|
| *Total time* | *0:00* |
#+END:
elp-intrument-function
elp-results
profile-start
,profile-report
benchmark-run
ert
assert
checkdoc
(add-hook 'emacs-lisp-mode-hook 'turn-on-orgstruct)
(global-set-key
(kbd "C-M-]") (lambda () (interactive) (org-cycle t)))
(global-set-key
(kbd "M-]") (lambda () (interactive)
(ignore-errors (end-of-defun) (beginning-of-defun)) (org-cycle)))
(call-process-shell-command "echo \"/^abc$/\" | pcretest")
(call-process "pcretest.sh" nil t nil "^abc")
;; See also
;; shell-command
;; M-| : shell-command-on-region
- Write sns-return to do the right thing
looking-at
looking-back
- Fix
font-lock-defaults
(don’t usefont-lock-add-keywords
, See manual) - auto-fill behavior (See
fill-paragraph-function
) - indent-line behavior (See
indent-line-function
) - defining options and faces
defgroup
defcustom
defface
- adding an advice with
ad-advice
add-hook
: e.g.(add-hook 'lisp-interaction-mode-hook 'auto-fill-mode)
remove-hook
run-hook
delay-mode-hooks
before-save-hook
before-init-hook
;; Examples: hooks in Org-mode
(defcustom org-mode-hook nil
"Mode hook for Org-mode, run after the mode was turned on."
:group 'org
:type 'hook)
;;;###autoload
(defun org-clock-persistence-insinuate ()
"Set up hooks for clock persistence."
(require 'org-clock)
(add-hook 'org-mode-hook 'org-clock-load)
(add-hook 'kill-emacs-hook 'org-clock-save))