0

In my org and tex files pandoc-mode shows up as an enabled minor mode.

However, when I try to run: "pandoc-main-hydra/body" emacs complains that ‘pandoc-main-hydra/body’ is not a valid command name. (When I run this command using a shortcut, it states: "Wrong type argument: commandp, pandoc-main-hydra/body").

I've been trying to find what is the problem for a while but without any luck. Any help would be appreciated

4
  • Do M-x locate-library RET pandoc-mode: I had a very old pandoc-mode installed that did not use the hydra before. Now that I've cleaned up the old version and installed latest from Melpa, I get the hydra and pandoc-main-hydra/body is defined for me.
    – NickD
    Sep 2, 2021 at 14:38
  • With locate-library I removed two old pandoc-mode.el. THANKS! However, when I tried reinstalling pandoc-mode my system complains: "pandoc-mode.el:1605:1:Warning: the following functions are not known to be defined: pandoc-input-format-hydra/body, pandoc-output-format-hydra/body, ebib
    – SaMeji
    Sep 3, 2021 at 20:14
  • Are you installing the package from MELPA?
    – NickD
    Sep 3, 2021 at 21:58
  • I am. But suddenly (and mysteriously as far as I can see) it is working. I had closed and open emacs a few times to make sure that it was not an issue with restarting the program. But now it is working. Thanks so much for your help. (BTW... do you want to just write your comments as an answer so that I can accept it?
    – SaMeji
    Sep 3, 2021 at 23:32

1 Answer 1

1

[Summarizing the comments as an answer]

Versions of pandoc-mode before April 1, 2015 did not include a hydra. The hydra branch was merged in version 2.12 of pandoc-mode. So if an earlier version of pandoc-mode is installed, then the hydra-related stuff (including pandoc-main-hydra/body) would just not be present. That was certainly the case for me (I had a version from 2012 - I neglected to record the version number) and apparently also for the OP.

I had a very old pandoc-mode installed that did not use the hydra. Now that I've cleaned up the old version and installed latest from Melpa, I get the hydra and pandoc-main-hydra/body is defined for me.

To clean up the files, find the location of the pandoc-mode files that you are using, by doing M-x locate-library RET pandoc-mode. Delete them and then install pandoc-mode from MELPA (or from the Github site https://github.com/joostkremers/pandoc-mode).

BTW, you can't query for the version of pandoc-mode from emacs: it is just a string like Version: 2.31 at the top of the pandoc-mode.el file, so you just have to visit the file to get it.

1
  • I mostly accepted your edit (particularly the locate-library stuff) but cleaned up the rest a bit. Thank you for improving the answer!
    – NickD
    Sep 5, 2021 at 21:14

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.