I would like to view man pages using emacs when invoking man command.
I modified the pager parameter in /etc/man.conf
PAGER to emacs
.
But, it doesn't work. Is there anything I should modify ?
Indeed, emacs cannot read STDIN into a buffer, meaning
cat foobar | emacs
does not work in any case. So setting your PAGER variable to 'emacs', or 'emacs -nw' does not do the job.
Only way around I see is to write the man
output into a tmp-file and then load that file into emacs:
man find > tmp-file; emacs tmp-file
You could alias this.
For example, assuming a tc-shell, and a directory called 'tmp' in your home-path, you can put the following line into your ~/.tcshrc
file:
alias man '/usr/bin/man \!* > ~/tmp/tmp-file; emacs ~/tmp/tmp-file; rm ~/tmp/tmp-file'
So next time you call man find
, emacs will fire up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With