I'm trying to figure out why Emacs won't display some man pages with my configuration using M-x man. It, however, does display them with emacs -Q. Not all man pages are affected. I can view the man page for ps but not the man page for ssh.

I worked through my init.el file and discovered my ability to generate the ssh man file ceases as soon as I load helm. What I did find whas that M-x helm-man-woman on ssh does work. So, I guess helm is screwing up other code inside emacs.

From peaking at the man.el source code I can't figure out how it could ever work. It is very complicated code and I am getting lost about what it's doing. It seems like Man-arguments gets assigned "" at some point, and then on line 1492 of lisp/man.el this leads to Emacs telling me it can't find the ssh manpage (or any other man page). I guess then somehow Man-page-list is not getting setup correctly. Why could this be? Presumably because (Man-build-page-list) is failing to do what it claims to do. How could any of this be related to helm?

  • I guess you mean turning on helm-mode by loading helm. M-x man's completing-read looks strange to me, it doesn't expect it's well supported by helm-mode. And even the completing-read doesn't show foo, you might still be able to read its man page, for example, M-x man from Emacs -Q on Mac doesn't show ssh. – xuchunyang Jul 19 at 9:51
  • @xuchunyang: I did see a bug report on the helm github about that github.com/emacs-helm/helm/issues/1145. I am on GNU/Linux so I didn't think that would apply to me. As I mentioned in the question, the problem rendering the man page is limited to M-x man. I can still render the man page with helm-man-woman for some reason. When I wrote my original draft of this question, I didn't know about that command. – wdkrnls Jul 20 at 1:51
  • Helm can't break M-x man, helm provides a wrapper of it, see yourself at helm-man.el, which contains about 100 line of code. – xuchunyang Jul 20 at 3:44
  • Interesting. The helm maintainer couldn't reproduce this either. However, it is very clearly noticeable when I run (helm-mode 1) and no longer a problem when I run (helm-mode 0). This may be a problem with my distribution's packaging of helm (Guix System). – wdkrnls Jul 21 at 3:16
  • M-x man's builtin completing implementation is non-standard for helm-mode to understand, I guess, though I don't know exactly the details. – xuchunyang Jul 21 at 9:11

Your Answer

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

Browse other questions tagged or ask your own question.