Reading Manpages in Emacs

You can read UNIX online documentation (or “manpages”) from within Emacs by typing ESC x man or by selecting Man from the Help menu. This command creates a buffer with a formatted manpage in it, which you can scroll through (or copy from) using Emacs commands. Simply type: ESC x manual-entry RETURN UNIX-command-name RETURN or or select Man from the Help menu.

For the UNIX command name, you can use either a simple name, like ls, or a manpage section name like ttytab(5).

The advantage of using the manual-entry command is that you can scroll through the manpage much easier than you can under many versions of UNIX. Also, if you try to view manpages in shell mode, they may come out garbled if the settings aren’t right, whereas manual-entry gives you clean text. The manual-entry command runs in the background. You may think that Emacs didn’t hear you, but, eventually, a window pops up with the manpage’s output, and you can scroll through it as with any Emacs buffer.

Get Learning GNU Emacs, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.