0

I don't like how M-x man takes a while to open the manpage, presumably because it is performing some formatting tasks. How can I solve this without losing the formatting?

Perhaps there is some easy way of prerendering all my manpages so that they're immediately ready when I need them?

habit
  • 143
  • 4
  • The function `man` calls the `man` program (e.g., `/usr/bin/man` on some systems) and then cleans up the results in the background and then, when it's all ready, that is when it gets displayed. This is how the author of the `man.el` library designed it to work. You could pop open a shell buffer or eshell buffer and type `man ....` and see if that works any better for your particular needs. – lawlist Jan 30 '23 at 23:47
  • I don't know what is causing the delay, but maybe the [woman](https://www.gnu.org/software/emacs/manual/html_mono/woman.html) package is faster? (it mentions that it usually is, for small and medium-sized man pages) – dalanicolai Jan 30 '23 at 23:54
  • For me, `M-x man RET bash` is instant (even after I kill the buffer, so that it has to be recreated from scratch). Once it is created, It just takes me to that buffer again with absolutely no delay. `woman` is slower: it takes a second or two to do the man page the first time, but after that it too gets back to the buffer with no delay. The `bash` man page is the second largest in my case, about 6K lines: the `gcc` man page is about 4x bigger, but `man` is equally fast (definitely under a second) and `woman` is slow: about 7 secs, in both cases starting from scratch, no delay afterwards. – NickD Jan 31 '23 at 02:48
  • @lawlist thanks, I'll consider that if I can no longer tolerate the delays. – habit Jan 31 '23 at 22:01
  • @dalanicolai Thanks for the suggestion, but I'm not willing to give woman a chance since it is not built on top of man and its equivalent code paths probably have much less user-testing and development behind them. Further, it can become unsynced and/or makes me think about caching, which I should not have to think about as an end-user; from your link: > If the cache ever gets out of synchronism with reality, running the woman command with a prefix argument (e.g., C-u M-x woman) will force it to rebuild its cache. – habit Jan 31 '23 at 22:05
  • @NickD your experience is helpful. I'm not sure what is causing my slowness. I've switched man-mode to a monospaced font and it seems to be faster now. – habit Jan 31 '23 at 22:07
  • I should have said: I use only monospaced fonts in emacs. – NickD Jan 31 '23 at 22:15
  • @habit yeah, I see, b.t.w. woman does not seem faster at all. – dalanicolai Jan 31 '23 at 23:01
  • @NickD That is all quite interesting, I was not aware of the large size of certain man pages, and the time it takes to render them. And it was easy to verify your 'observations'... – dalanicolai Jan 31 '23 at 23:02
  • You don't specify your OS, but have you tried pre-formatting your manpages with `catman`? id be shocked if M-x man couldn't handle them – nega Feb 09 '23 at 02:50

0 Answers0