3

There is a built-in org-mode shortcut where a t character followed by TAB key results in an auto-complete function that produces the # TODO: string literal. How can I disable this? Even better, how can I look up the function/key-binding that is called when this org-mode shortcut occurs so I can disable similar auto-complete functions from getting called?

I am aware of the C-h k and C-h f commands, but this is not a normal key-binding and I don't know what the function is called.

I would like to disable this shortcut because I find it annoying, especially when tabbing through org-mode tables.

  • 1
    Are you sure that's built in to org-mode? I don't get any such behavior after emacs -Q. – Dan Mar 4 '15 at 11:23
6

It's a snippet, activated with yasnippet. Notice how it starts with a comment character, this hinted to me that it wasn't an org-mode feature. Why would org-mode comment out a todo?

I have something similar that I got from this snippet repository, but it only works in modes derived from prog-mode (which excludes org-mode). However, the snippets directory is actually a git submodule, and if you inspect that repository, you find a commit called "Split text snippets into prog and fundamental". The commit message:

None of the text-mode snippets were actually specific to text-mode; fixme, todo, and xxx were for making comments, those were moved to prog-mode.

So it seems like you're using an old version of that submodule repo.

To change this, either delete the snippet file (simply named "todo"), or change the key that activates it.

2
M-x find-function-on-key  RET

then, TAB keypress will take you to the function that plays spoilsport in org-mode.

  • This is a suggestion for how to investigate the problem, rather than an answer. Could you please switch it to a comment? – Dan Mar 4 '15 at 12:12
  • To be fair, the question does include the more general question of how to track down the binding. – glucas Mar 4 '15 at 13:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.