doomemacs / doomemacs/core

In non-Evil use, `vimish-fold` conflicts with `AUCTeX` and disables `'TeX-mode-map` keybindings beginning with `C-c C-f`

Open
#5,951 5 comments 2 reactions 0 assignees View on GitHub
is:bug needs-triage
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### What did you expect to happen?

I use Doom Emacs but not with Evil keybindings (i.e. in my `init.el`, `(evil +everywhere)` is disabled).

When editing a LaTeX file with AUCTeX's `latex-mode`, I expect to be able to type any of several key sequences beginning `C-c C-f` and have some LaTeX formatting command inserted. For example, `C-c C-f C-e` should produce `\emph{}`, or `C-c C-f C-b` should produce `\textbf{}`.

These key sequences are created by `TeX-mode-map`, which AUCTeX binds to `C-c C-f`.

### What actually happened?

What actually happens is that, even though AUCTeX is loaded and the relevant commands and keyboard shortcuts can be seen and are listed in the menu under LaTeX > Insert Font, these keybindings do not work. Instead, Emacs reports, e.g.,

`C-c C-f C-e is undefined`

Other AUCTeX keybindings (e.g. `C-c C-s` for "New Section" and so on) continue to work as usual.

### Describe your attempts to resolve the issue

This issue appears to be caused by the `vimish-fold` package somehow disabling these particular keybindings in AUCTeX. Removing `vimish-fold` from `init.el`, by commenting out the line

```
;;fold
```
in the `:editor` section and then and re-syncing with `doom sync` solves the issue. It seems that `vimish-fold` defines a menu sequence that is triggered by `C-c C-f` (so that e.g. `C-c C-f C-d` triggers `vimish-fold-delete`). In the process it unbinds all the formatting bindings that AUCTeX's `TeX-mode-map` assigns under `C-c C-f`.

### Steps to reproduce

1. In `init.el`, ensure that `;;(evil +everywhere)` is _disabled_.
2. In `init.el`, ensure that `fold` is _enabled_.
3. In `init.el`, ensure that `latex` is _enabled_.
4. Open a LaTeX file.
5. Try to insert, e.g. `C-c C-f C-e` for `\emph{}`.
6. Modeline error message: `C-c C-f C-e is undefined`.

### System Information

https://pastebin.com/HtNCKfht

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.