unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: yyoncho <yyoncho@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: tramp and executable-find
Date: Sat, 20 Jun 2020 22:29:57 +0300	[thread overview]
Message-ID: <CACCVLQV++WgXq=oEBKzRFjNBRWMhiKQicEQEy=Ln_rMEFWkYrQ@mail.gmail.com> (raw)
In-Reply-To: <87366pzh1a.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1811 bytes --]

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.
>

[-- Attachment #2: Type: text/html, Size: 2609 bytes --]

  reply	other threads:[~2020-06-20 19:29 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
2020-06-20 19:29             ` yyoncho [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CACCVLQV++WgXq=oEBKzRFjNBRWMhiKQicEQEy=Ln_rMEFWkYrQ@mail.gmail.com' \
    --to=yyoncho@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).