Previous: , Up: Interaction   [Contents][Index]


16.13.2 Packages that conflict with Org mode

In Emacs, shift-selection combines motions of point with shift key to enlarge regions. Emacs sets this mode by default. This conflicts with Org’s use of S-<cursor> commands to change timestamps, TODO keywords, priorities, and item bullet types, etc. Since S-<cursor> commands outside of specific contexts do not do anything, Org offers the variable org-support-shift-select for customization. Org mode accommodates shift selection by (i) making it available outside of the special contexts where special commands apply, and (ii) extending an existing active region even if point moves across a special context.

cua.el’ by Kim F. Storm

Org key bindings conflict with S-<cursor> keys used by CUA mode. For Org to relinquish these bindings to CUA mode, configure the variable org-replace-disputed-keys. When set, Org moves the following key bindings in Org files, and in the agenda buffer—but not during date selection.

S-UPM-pS-DOWNM-n
S-LEFTM--S-RIGHTM-+
C-S-LEFTM-S--C-S-RIGHTM-S-+

Yes, these are unfortunately more difficult to remember. If you want to have other replacement keys, look at the variable org-disputed-keys.

ecomplete.el’ by Lars Magne Ingebrigtsen

Ecomplete provides “electric” address completion in address header lines in message buffers. Sadly Orgtbl mode cuts Ecomplete’s power supply: no completion happens when Orgtbl mode is enabled in message buffers while entering text in address header lines. If one wants to use ecomplete one should not follow the advice to automagically turn on Orgtbl mode in message buffers (see Orgtbl Mode), but instead—after filling in the message headers—turn on Orgtbl mode manually when needed in the messages body.

filladapt.el’ by Kyle Jones

Org mode tries to do the right thing when filling paragraphs, list items and other elements. Many users reported problems using both ‘filladapt.el’ and Org mode, so a safe thing to do is to disable filladapt like this:

(add-hook 'org-mode-hook 'turn-off-filladapt-mode)
viper.el’ by Michael Kifer

Viper uses C-c / and therefore makes this key not access the corresponding Org mode command org-sparse-tree. You need to find another key for this command, or override the key in viper-vi-global-user-map with

(define-key viper-vi-global-user-map "C-c /" 'org-sparse-tree)
windmove.el’ by Hovav Shacham

This package also uses the S-<cursor> keys, so everything written in the paragraph above about CUA mode also applies here. If you want to make the windmove function active in locations where Org mode does not have special functionality on S-<cursor>, add this to your configuration:

;; Make windmove work in Org mode:
(add-hook 'org-shiftup-final-hook 'windmove-up)
(add-hook 'org-shiftleft-final-hook 'windmove-left)
(add-hook 'org-shiftdown-final-hook 'windmove-down)
(add-hook 'org-shiftright-final-hook 'windmove-right)
yasnippet.el

The way Org mode binds the TAB key (binding to [tab] instead of "\t") overrules YASnippet’s access to this key. The following code fixed this problem:

(add-hook 'org-mode-hook
          (lambda ()
            (setq-local yas/trigger-key [tab])
            (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))

The latest version of YASnippet does not play well with Org mode. If the above code does not fix the conflict, start by defining the following function:

(defun yas/org-very-safe-expand ()
  (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))

Then, tell Org mode to use that function:

(add-hook 'org-mode-hook
          (lambda ()
            (make-variable-buffer-local 'yas/trigger-key)
            (setq yas/trigger-key [tab])
            (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
            (define-key yas/keymap [tab] 'yas/next-field)))

Previous: , Up: Interaction   [Contents][Index]