The combination of org capture, org-metaleft (bound to S-LEFT), and refiling can mess up an org file. Here is an example:

  • Start a new heading with quick capture, say *** new. This heading is refiled depending on your quick capture template, say ** Miscellaneous.
  • Press S-LEFT twice, which is bound to org-metaleft and which I often use to go back a word instead of M-b. The heading *** new becomes * new and all the next level 2 headings will become children of this new heading.
  • Refile with C-c C-w, say to * Today. The heading becomes ** new and carries all the children with it to the new location.

The problem with this behavior is that it is completely hidden, unlike in the main buffer where I would see it happening. So I think org-metaleft should be disabled in org capture.

Why is it enabled, and how to turn it off?

  • 2
    I don't use a current version of org-mode and do not anticipate installing it any time soon. That being said, a quick Google search lead me to the variable org-capture-mode-map which contains a doc-string: "Keymap for org-capture-mode, a minor mode. Use this map to set additional keybindings for when Org-mode is used for a capture buffer." So, perhaps you can just define the key has having a nil value for the function ... See: emacs.stackexchange.com/questions/7546/… You may need to (require 'org-capture) or use eval-after-load ... – lawlist Nov 12 at 18:10
  • Very good idea! But C-h k <M-LEFT> on an org-capture buffer shows that the key is bound through org-mode-map, not org-capture-mode-map. So I overrode the keybinding of M-LEFT to a function that checks if the current buffer is an Org-capture buffer. Do you want to write an answer or shall I post my code? – miguelmorin Dec 7 at 20:38
  • @lawlist I'm curious if you use another software to organize your to-do list and track time? – miguelmorin Dec 7 at 20:41
  • 1
    I use a flat text file for each client to track time using a certain format that is always the same so that I can use a regexp to calculate all of the time spent over a given period; e.g., 0.2 hours -- 12/17/2019: Conference with client. I manually log my time in/out. For the past 5+ years, I have strictly used a custom/modified version of org-mode to keep track of tasks and events, using the same keywords as toodledo.com, which I sync with using a custom/modified of org-toodledo.el. I use a custom/modified version of calfw; and, github.com/lawlist/lorg-calendar – lawlist Dec 7 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.