emacsmanuals

Unable to put manuals open at Emacs directly from terminal


I want to open manuals directly in Terminal to Emacs by

man man

I put the following code as an alias in .zshrc unsuccessfully

alias man=x
unalias man  
man() { emacs ^x man }

How can you open manuals to emacs?


Solution

  • Perhaps this is what you mean:

    function man() { emacs -eval "(progn (setq Man-notify-method 'bully) (man \"$1\"))" }
    

    The setq is there just to make the manual page hide the *scratch* buffer; if you don't want that, it is enough to do

    function man() { emacs -eval "(man \"$1\")" }
    

    If you want to call Emacs functions from the command line, you must write the function call in elisp; you can't just give Emacs key sequences on the command line.