Org configuration(s)

Table of Contents

GTD setups

General Configuration/Customization

Some useful keybindings

Here is a subset of my personal org-mode key-bindings that others may find useful.

(add-hook 'org-mode-hook (lambda ()
                           (local-set-key "\M-n" 'outline-next-visible-heading)
                           (local-set-key "\M-p" 'outline-previous-visible-heading)
                           ;; table
                           (local-set-key "\M-\C-w" 'org-table-copy-region)
                           (local-set-key "\M-\C-y" 'org-table-paste-rectangle)
                           (local-set-key "\M-\C-l" 'org-table-sort-lines)
                           ;; display images
                           (local-set-key "\M-I" 'org-toggle-iimage-in-org)
                           ;; fix tab
                           (local-set-key "\C-y" 'yank)
                           ;; yasnippet (allow yasnippet to do it's thing in org files)
                           (make-variable-buffer-local 'yas/trigger-key)
                           (setq yas/trigger-key [tab])
                           (define-key yas/keymap [tab] 'yas/next-field-group)))

References and Explanations of the above:

  • see * iimage in org (display images in org files) for an explanation of the org-toggle-iimage-in-org function (inline images in org-mode files).
  • yasnippet is a tools for snippet expansion in Emacs. Since Org-Mode is descendant of text-mode, all text snippets will work inside of org files, I also use the following to simplify the creation of example and source code blocks.

block

#name : #+begin_...#+end_
# --
#+begin_$1 $2
$0
#+end_$1

iimage in org (display images in org files)

Thanks to many on the mailing list for this great addition to Org-Mode. See iimage for information on iimage-minor-mode.

(defun org-toggle-iimage-in-org ()
  "display images in your org file"
  (interactive)
  (if (face-underline-p 'org-link)
      (set-face-underline-p 'org-link nil)
      (set-face-underline-p 'org-link t))
  (iimage-mode))