1

I very recently started having an issue with my tab key while editing latex files.

Normally, the tab key will indent according to whatever mode I'm editing in. Now, when I hit the tab key the minibuffer prints TAB and nothing happens in the main buffer. Issuing TAB again yields TAB TAB undefined in the minibuffer.

Issuing C-h k <tab key> yields:

Describe the following key, mouse click, or menu item:  TAB-

with no description of what the tab key is bound to.

Aside from losing the ability to quickly indent my latex code, this has also disrupted my ability to trigger yasnippets using the tab key.

What is going wrong?

Addendum: I think this is only happening in latex-mode. At least, I haven't noticed this problem in other modes. Issuing TAB C-h yields

`yas--direct-latex-mode' Minor Mode Bindings Starting With TAB:
key             binding
---             -------


Global Bindings Starting With TAB:
key             binding
---             -------

[back]

1 Answer 1

3

It has become a prefix key, meaning it starts a sequence of keys the way C-x does. Try typing TAB C-h to see what keymap it is a prefix for.

Edit: Now that we can see that the keymap assigned to TAB is yas--direct-latex-mode, we know that this is coming from yasnippet (the Yet Another Snippet extension for Emacs). I actually don’t use that, so I am not sure if it is supposed to be assigned to the TAB key or not. Still, you can turn it off by typing M-x yas-minor-mode.

You can also look for yasnippet–related settings in your init file and comment them out.

1
  • Added the output of TAB C-h to the question. Commented Jul 30, 2022 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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