joostkremers / pandoc-mode

An Emacs minor mode for interacting with Pandoc.
https://joostkremers.github.io/pandoc-mode/
177 stars 14 forks source link

process citations not working; hydra menu glitch #102

Closed newhallroad closed 3 years ago

newhallroad commented 3 years ago

Thank you for a wonderful program and for all the work you do.

I am on windows GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 pandoc 2.11.4 pandoc-mode 20201120.2241

Since updating to the latest pandoc-mode, I am having trouble with citations. As you can see from the image below, "c" in the citation menu is tied both to "Process Citations" and also to "CSL File". When I type "c", I am asked for a CSL file and I am unable to toggle process citations to "yes".

Also, as you can see, there is some repetition in the menu. Perhaps this is a related issue? I would appreciate your guidance. Many thanks.

Untitled

joostkremers commented 3 years ago

In the latest version, the --csl option has the key C (i.e., capital C), while c is used for citation processing (i.e., the option --citeproc), so if pandoc-mode installs correctly, there is no conflict.

Unfortunately, if you update pandoc-mode in a session in which it has already been loaded, the hydra menus may get messed up. Which I assume is what happened in your case. The only way I've found to solve it is to remove pandoc-mode, restart Emacs and install it again.

This seems to be related to the fact that the hydra menus are defined dynamically, during compilation. That's not entirely how they're meant to be defined, but it has the advantage that adding support for a new pandoc option to pandoc-mode is usually a one-liner. But it comes at a cost...

Could you please try the procedure and let me know how it goes?

newhallroad commented 3 years ago

You are wonderful! That solved the problem. Thanks for such a quick response.