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 21:14:09 +0200	[thread overview]
Message-ID: <87366pzh1a.fsf@gmx.de> (raw)
In-Reply-To: <CACCVLQWMGO+aRM=-Su2Eb-CsOhRLaJyeh=FQcqeMiHL06NE4VQ@mail.gmail.com> (yyoncho@gmail.com's message of "Sat, 20 Jun 2020 21:27:38 +0300")

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	other threads:[~2020-06-20 19:14 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
2020-06-20 18:23       ` yyoncho
2020-06-20 18:27         ` yyoncho
2020-06-20 19:14           ` Michael Albinus [this message]
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=87366pzh1a.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.