How to make Emacs person work on Tramp?

I have a question regarding use M-x manin Emacs. I constantly work with Tramp, and the often installed base of programs on a remote server is significantly different from my local configuration. I see that the call M-x maninvolves finding the appropriate files on the local machine. Is there a way to teach him how to use the environment on the other side of Tramp?

I know that there is an Elisp variable tramp-remote-process-environment, and I tried to add an entry for it MANPATH, but it does not work (I'm afraid because I put it in the form /usr/share/maninstead /scpc:user@host:/usr/share/man, but what I want is a general solution to work on all remote hosts ) Any ideas?

+4
source share
2 answers

From the macro Man-start-callingto man.el:

(let (...
    (default-directory
      (if (and (file-directory-p default-directory)
               (not (find-file-name-handler default-directory
                                            'file-directory-p)))
          default-directory
        "/"))

That is, if there is a special file name handler for the current default directory, such as Tramp, it will use the root directory as the directory to run manfrom from, and therefore it will see man pages from the system that Emacs is running.

It seems that there is no way to disable this, except for the change man.el. Note that this is a macro, so you need to reload the macro and all the functions that use the macro.

+2
source

From the docstring command, a person expects him to be able to read deleted pages:

You can specify an explicit file name. Use -l if possible; otherwise look like the page name.

/my/file/name.1.gz
-l somefile.1

, .

0

Source: https://habr.com/ru/post/1535698/


All Articles