Emacs
Sunday, 15 June 2008 10:14

1 Read info

C-u M-x info RET

2 Orgmode

 

2.1 Drawer

  • This is a headline
    Still outside the drawer :DRAWERNAME: This is inside the drawer. :END: After the drawer.

2.2 Properties and Columns

 

2.3 Column view

  • Top node for columns view

2.4 Examples

Great clouds overhead
Tiny black birds rise and fall
Snow covers Emacs

– AlexSchroeder

Everything should be made as simple as possible, but not any simpler – Albert Einstein

Some example from a text file. Maybe fore ...
A short line of examples
A short line of examples
(defun org-xor (a b)
"Exclusive or."
(if a (not b) b))
;;-----------------------------------------------------------
;; $Id: sx-ini.el,v 1.2 2009/12/14 17:13:11 xs32 Exp $
;;-----------------------------------------------------------
;;-----------------------------------------------------------
;; Initial Settings
;;-----------------------------------------------------------
;;-----------------------------------------------------------
;; Link this file to ~/.emacs.d/init.el or ~/.emacs
;; -------------------------------------------------------
(add-to-list 'load-path "~/.pri/emacs") (load "sx-set") (load "sx-fun") (load "sx-key") ;;-----------------------------------------------------------
;; Local Package
;;-----------------------------------------------------------
(if (string-match "dolphin.xshi.org" system-name) (load "sx-dolphin")) (if (string-match "lns.cornell.edu" system-name) (load "sx-lepp")) (if (string-match "WHOLPHIN" system-name) (load "sx-wholphin")) (if (string-match "cern.ch" system-name) (load "sx-cern"))

bold, italic, underlined, code and verbatim, and, if you must, strike-through

2.5 Formula in table

"C-c =" in the field. "C-c C-c" in the line of "#+TBLFM".

2.6 Narrow

C-x n s/w

3 Muse Mode

 

4 Documentation

5 Foot note

To start: C-c ! a To back: C-x C-x

6 Wiki-Index

<example> <lisp>(muse-index-as-string t t t)</lisp> </example>

7 Outline-minor

M-x customize muse-mode-hook INS : outline-minor-mode

8 Anchors

If you begin a line with "#anchor" - where "anchor" can be any word that doesn't contain whitespace - it defines an anchor at that point into the document. This point can be referenced using "page#anchor" as the target in a Muse link.

9 More Depth in Contents

<example> <contents depth="4"> </example>

10 Tags

literal :: which causes a marked block to be entirely left alone. comment :: same as "; "

11 Using the Clipboard

M-x menu-bar-enable-clipboard

M-x x-select-enable-clipboard

12 Chinese Input

M-x set-language-environment : Chinese-GB

M-x set-input-method

13 Key Bindings

 

13.1 Local Key Bindings

;; outline-minor-mode (add-hook 'outline-minor-mode-hook '(lambda () (define-key outline-minor-mode-map "\C-coe" 'show-entry) (define-key outline-minor-mode-map "\C-coa" 'show-all) (define-key outline-minor-mode-map "\C-cob" 'hide-body) (define-key outline-minor-mode-map "\C-coc" 'hide-entry))) </example>

14 Windows

 

14.1 scroll

<example> (setq scroll-step 1 scroll-margin 1 scroll-conservatively 10000) </example>

15 Dired Mode

s :: Toggle between alphabetical order and date/time order (dired-sort-toggle-or-edit).

16 Add content in muse

<example> <lisp> (with-temp-buffer (insert-file-contents "~/work/CLEO/analysis/DHad/dat/fit/Gamma0.035dataSingleD0AndD0BtoKpipi0.txt") (buffer-string) ) </lisp> </example>

17 AUCTeX

Install

<example> ./configure –prefix=/home/xs32/local –with-lispdir=/home/xs32/local/share/emacs/site-lisp –with-texmf-dir=/home/xs32/local/share/texmf </example>

18 Edit as root in Emacs

C-x C-f /sudo::/etc/apt/sources.list RET

19 confirm-kill-emacs

Customize variable "confirm-kill-emacs"

20 Recursive Editing

C-M-c quit

21 Multi-term

  • Remote Term Type

    The local eterm-color term type provided with emacs works great for applications such as less that require more than a dumb terminal, but what about using those apps on a remote host which may not have emacs installed and know nothing of this term type? For these remote hosts, you’ll need to copy the eterm-color and eterm-color.ti files from the /usr/share/emacs/22.1/etc/e directory on your local system to the following remote directory:

    ~/.terminfo/e/eterm-color
    ~/.terminfo/e/eterm-color.ti
    
  • Get help keys: C-c C-h
  • Split window : C-c 2
  • Switch buffer: C-c b

22 Mail

 

22.3 Commands


Contents Commands
List the server's active-file (all groups) A A
Subscribe groups U
Mark a message as read RET
Apply a star to the message !
Remove the star from the message M-u
Apply a label to the message B m
Send a message m
Delete a message in inbox B DEL
Mark all unread articles as read M C
Post a followup to this article F
Mail a wide reply to this article S W
Forward this article by mail C-c C-f
Post a fllowup wia news even got from mail S N
Get help in Message C-c ?
Kill Message C-c C-k
Send Message C-c C-c
MIME: prompt for a filename and save o
MIME: view externally e

23 Read Man page

M-x man RET man(2)

24 EasyPG

http://emacs.wordpress.com/2008/07/18/keeping-your-secrets-secret/

;; Emacs 23: bundled EasyPG
(require 'epa)
(epa-file-enable)

or, if you installed it externally:

;; EasyPG installed in path/to/epg (add-to-list 'load-path "path/to/epg") (require 'epa-setup) (epa-file-enable)