|
From: | yyoncho |
Subject: | Re: tramp and executable-find |
Date: | Sat, 20 Jun 2020 21:23:15 +0300 |
yyoncho <yyoncho@gmail.com> writes:
> Hi Michael,
Hi Ivan,
> Can you comment on remote flag mentioned by Philip as well?
>
> Here it is the docs for it:
>
> REMOTE is non-nil, search on the remote host indicated by
> `default-directory' instead.
Right, I forgot this. Sorry. So let's go back to your question:
>> As part of investigating
>> https://github.com/emacs-lsp/lsp-mode/issues/1688 I noticed that
>> executable-find does not return the binary when it is not on the
>> remote PATH(or at least this is what I see) even if you specify the
>> full path to the binary. Can you comment if this is the expected
>> behaviour?
The crucial point is `default-directory'. In my local environment, I
have for example
--8<---------------cut here---------------start------------->8---
(let ((default-directory "/tmp"))
(executable-find "emacs"))
"/usr/local/bin/emacs"
(let ((default-directory "/tmp"))
(executable-find "emacs" 'remote))
"/usr/local/bin/emacs"
(let ((default-directory "/ssh:ford:"))
(executable-find "emacs"))
"/usr/local/bin/emacs"
(let ((default-directory "/ssh:ford:"))
(executable-find "emacs" 'remote))
"/opt/bin/emacs"
--8<---------------cut here---------------end--------------->8---
You get the remote path only if `default-directory' is a remote file
name, and the REMOTE argument of `executable-find' is non-nil. And this
is understandable: if `default-directory' is not a remote file name,
`executable-find' does not know which remote host it shall use for search.
> Thanks,
> Ivan
Best regards, Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |