If I use info inside emacs and enable variable-pitch-mode, all text is displayed in proportional fonts, but the text width is all wrong, because info-mode laid out the text assuming fixed-width characters and a window width of something like 70 characters. The same thing happens in help buffers as well.

How do I get info-mode to lay out the text neatly when using a variable-width font?

  • magic-buffer has a demonstration on how to align proportional text in Emacs. Perhaps this can be used to hack this into M-x info.
    – wasamasa
    Dec 24, 2014 at 8:37
  • Another approach can be seen in justify-kp, a demonstration of justified text filling for proportional text.
    – wasamasa
    Dec 24, 2014 at 8:38

1 Answer 1


You can't. A proper text layout for proportional fonts would require dynamic re-filling of paragraphs, which is generally impossible to do correctly with info documents, since they contain no semantic information at all. Same for docstrings, which you see in Help Mode, except that these don't even start with any markup at all...

Hence it's impossible to know a given paragraph could be re-filled, if at all. In other words, the Info viewer has no chance to find out whether a paragraph is free text, or preformatted text like a source code example, which must not be refilled.

That's a big weakness of Info and one if the reasons why Emacs' documentation infrastructure is in dire need of modernisation.

  • Regarding docstrings: I can use fill-paragraph when I'm editing them, but not when I'm reading them, so it can't be completely impossible. Is there a way to get fill-paragraph to do something helpful?
    – Kirill
    Dec 24, 2014 at 23:47
  • @Kirill You still need to know whether what you're attempting to refill is a paragraph or not (and a list or code example instead). This answer points out that there is no generic way to know that for sure and therefore, achieving your goal perfectly is impossible.
    – wasamasa
    Dec 25, 2014 at 8:58
  • The Texinfo sources do contain semantic information, however. Can that be used?
    – user2005
    Jul 25, 2015 at 20:03

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.