emacs - 在命令行中调用 man 命令时如何使用 emacs 查看手册页?

标签 emacs pager manpage

我想在调用 man 命令时使用 emacs 查看手册页。
我修改了 /etc/man.conf 中的 pager 参数寻呼机至 emacs .

但是,它不起作用。有什么我应该修改的吗?

最佳答案

确实,emacs 无法将 STDIN 读入缓冲区,这意味着
cat foobar | emacs
在任何情况下都不起作用。因此,将 PAGER 变量设置为 'emacs' 或 'emacs -nw' 不起作用。
我看到的唯一方法是写 man输出到 tmp 文件,然后将该文件加载到 emacs 中:
man find > tmp-file; emacs tmp-file
你可以别名这个。
例如,假设一个 tc-shell 和一个名为 'tmp' 的目录在您的主路径中,您可以将以下行放入您的 ~/.tcshrc文件:
alias man '/usr/bin/man \!* > ~/tmp/tmp-file; emacs ~/tmp/tmp-file; rm ~/tmp/tmp-file'
所以下次你打电话man find ,emacs 会启​​动。

关于emacs - 在命令行中调用 man 命令时如何使用 emacs 查看手册页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10644163/

相关文章:

android - PagerTabStrip 和 PagerTitleStrip 的区别?

model-view-controller - 如何在jqgrid中有2个传呼器,一个在顶部,一个在底部?

Emacs 口齿不清 : Can't set any value to variable named 's'

actionscript-3 - 如何在 Emacs 中控制左括号后的缩进

javascript - 在 viewDataSource 上使用 StartKey

linux - 联机帮助页中 Unix 命令名称后括号中的数字是什么意思?

ruby - 如何为 RDoc::usage() 定义没有 === 标题的部分?

c++ - 在 C++ 中设置本地环境变量

macos - 在 MacOS 上,hunspell 在 Library/Spelling/中找不到现有的 .aff 和 .dic 文件

windows - Emacs Windows 拼写检查 - aspell 或 hunspell