Emacs/OrgMode

Links

Create a target:

  • Add CUSTOM_ID property for a headline
  • #+NAME: My Target
  • <<My Target>>

Create a link such as ‘[[My Target]]’ or ‘[[My Target][Find my target]]’.

Key Bindings

  • Edit link: C-c C-l
  • Open link: C-c C-o
  • Retrun to previous position: C-c &

The Calendar and the Diary

Sexp Entries

manual

  • %%(diary-float t 1 -1): on the last Monday of every month
  • %%(diary-float t 2 2): on the second Tuesday of every month
  • %%(memq (calendar-day-of-week date) '(1 3 4 5)): on the weekdays

Code Blocks

     #+NAME: <name>
     #+BEGIN_SRC <language> <switches> <header arguments>
       <body>
     #+END_SRC

See Languages, for identifiers of supported languages.

The Clock Table

Org mode can produce complex reports on basis of the time clocking information. Such a report is called a clock table.

  • C-c C-x C-r (org-clock-report)
  • R (org-agenda-clockreport-mode)
    • Show clock report in Org-Agenda mode.

Encrypting org Files

http://orgmode.org/worg/org-tutorials/encrypting-files.html

Encrypt the whole file using gnupg. Note that gpg encrypted files should be saved with the default extension of .gpg.

# -*- mode:org; epa-file-encrypt-to: ("me@mydomain.com") -*-

Adding .gpg files path to org-agenda-files variable can show tasks, which are defined within the encrypted files, in agenda.

Use gpg-agent to cache passwords.

$ eval $(gpg-agent)

Export secret key.

$ gpg --export-secret-keys ${ID} > secret.key

Export public key.

$ gpg --export ${ID} > public.key

Import key.

$ gpg --import secret.key
$ pgp --import public.key