all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: yyoncho <yyoncho@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: tramp and executable-find
Date: Sat, 20 Jun 2020 19:43:09 +0200	[thread overview]
Message-ID: <877dw1zl8y.fsf@gmx.de> (raw)
In-Reply-To: <CACCVLQXCCDre8n53_1O5faU2NHxeAOH0pOnrpaGMjUKZFdLO9w@mail.gmail.com> (yyoncho@gmail.com's message of "Sat, 20 Jun 2020 20:08:06 +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.



  reply	other threads:[~2020-06-20 17:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-20 15:22 tramp and executable-find Ivan Yonchovski
2020-06-20 16:47 ` Michael Albinus
2020-06-20 17:00   ` Philipp Stephani
2020-06-20 17:08   ` yyoncho
2020-06-20 17:43     ` Michael Albinus [this message]
2020-06-20 18:23       ` yyoncho
2020-06-20 18:27         ` yyoncho
2020-06-20 19:14           ` Michael Albinus
2020-06-20 19:29             ` yyoncho
2020-06-21  7:16               ` Michael Albinus
2020-06-21  8:41                 ` yyoncho
2020-06-21  9:34                   ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dw1zl8y.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=yyoncho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.