Emacs has a “man” command. Its purpose is for display unix documentation called “man page”. However, it does not do syntax coloring. Emacs has a alternative command called “woman” that does do syntax coloring. However, there are some major usability problems for “woman”. (emacs's “man” is a elisp wrapper that calls the unix “man” utility. “woman” is written in elisp entirely.)
• Alias “man” to “woman” (
(defalias 'man 'woman)) doesn't work. When you call
M-x man, it still invoke “man”.
• When calling “woman”, it takes some 3 secs to start up. In contrast, “man” starts right away without this delay. (The mini buffer message is: “Building list of manual directory expansions...”, “Building completion list of all manual topics...”)
• Often “woman” will prompt me to make a choice among man pages of the same name found in different man paths. Very annoying. From my experiences in unix using in the past 10 years, maybe only once a year that “man” didn't make the right choice.
• Another flaw, perhaps reasonable, is that “woman” does not work for some “man” pages. For example, type 【Alt+x woman Enter ↵ killall】, on OS X 10.4.x, and the display returned start with:
.Dd June 25, 1995 .Os .Dt KILLALL 1 .Sh NAME .Nm killall
Emacs should fix the above problems. And, perhaps alias “man” to “woman” by default. The goal is that emacs simply provides a command to read unix manual pages, without user having to know the tech details about “man” and “woman”. When “woman” detects a man page in a format it cannot read, automatically launch “man” instead.
Eli Zaretskii wrote:
The problems you mention are a far cry from making WoMan “unusable”.
“unusable” is probably a exaggeration. I'm trying to express how it is unusable to most users who are not emacs enthusiasts.
Consider emacs as a tool. Emacs “man” and “woman” are tools too. People want to run man/woman to get the job done, namely, reading unix man page in emacs. “man” works. “woman” is apparently a improvement, but why isn't it the default? The extra options and configuration adds a burden to the users. Worse is that “woman” itself isn't polished software. So for some emacs user who are beginning to be adventurous, when they read about “woman” and try it, they end up 5 minutes, 10 minutes, 20, or more about the tool itself instead of getting the jobs done.
Each thing individually are trivial problems, but emacs with so many unusual streaks, terminologies, non-standard keyboard shortcut notation, unusual undo/redo scheme, configurations etc, earns emacs the steep learning curve and drive away most professional programers.
I think most, or all of these can be fixed, without sacrificing ANY of emacs's power.
Back to the particular case of “woman” … for example, i think that:
• Man and “woman” should be merged, in the sense that user are taught one single command “man” to read unix manual page. This can possibly be done by aliasing man to “woman”, and:
• The onset delay of “woman” can certainly be minimized, perhaps by looking into ways to optimize, cache, or done after the first call of “woman”, in the background. (example: when user is not typing actively) (so that, at the second call of “woman” in a session, name completion feature is there, transparently) Here, i think caching it under 〔~/.emacs.d/〕 is probably a very good solution.
• When “woman” detect a page it cannot read, launch man.
• Eliminate the fact that “woman” prompt user to make a choice. (which i think this thread's patch fixes)
Addendum: Emacs 24.3 will have syntax coloring in man page. Thanks to boostjam for the tip.Disqus