emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp and executable-find


From: yyoncho
Subject: Re: tramp and executable-find
Date: Sat, 20 Jun 2020 22:29:57 +0300

Hi Michael,

Thank you,  this is enough for me to solve the original issue in lsp-mode repo. 

As a side note, if you do search for /bin/ls executable-find will work 
although it is not prefixed with the remote identifier. This is what
confused me initially.

> Why do you want to give an
> absolute file name as argument?

This is a configuration setting for lsp-mode when the server is located
on the remote server. Some users dont have admin access on the remote 
machine so they put the binary somewhere else so they have you use full
path.

Thanks,
Ivan

On Sat, Jun 20, 2020 at 10:14 PM Michael Albinus <michael.albinus@gmx.de> wrote:
yyoncho <yyoncho@gmail.com> writes:

> Here it is an example:
>
> Copy ls from /bin/ and name it lss.
>
> Then:
>
> ;; works
> (let ((default-directory "<remote-path>"))
>   (executable-find "lss" 'remote))
>
> ;; does not work
> (let ((default-directory "<remote-path>"))
>   (executable-find "/bin/lss" 'remote))

But this second example doesn't make sense. You want to know the path,
where the executable "lss" is located. Why do you want to give an
absolute file name as argument?

The docstring of executable-find says "Search for COMMAND in ‘exec-path’".
A command is a command, and not an absolute file name.

*If* you want to use an absolute file name, you would need to give it
also to the command, like

(let ((default-directory "<remote-path>"))
  (executable-find "<remote identification>/bin/lss" 'remote))

where <remote identification> is something like /ssh:user@host: - you
see that this doesn't make sense. Search for "lss", that's it, as you
have shown with your first example.

> Thanks,
> Ivan

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]