From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: yyoncho Newsgroups: gmane.emacs.devel Subject: Re: tramp and executable-find Date: Sat, 20 Jun 2020 22:29:57 +0300 Message-ID: References: <871rm9u5hw.fsf@gmail.com> <87blldzntb.fsf@gmx.de> <877dw1zl8y.fsf@gmx.de> <87366pzh1a.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009a298305a88909ed" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="125915"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 20 21:31:14 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jmjCr-000Wfk-JQ for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 21:31:13 +0200 Original-Received: from localhost ([::1]:50768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmjCq-00035o-LZ for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 15:31:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmjBs-0002an-Bf for emacs-devel@gnu.org; Sat, 20 Jun 2020 15:30:12 -0400 Original-Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]:40177) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmjBq-0005IJ-KP for emacs-devel@gnu.org; Sat, 20 Jun 2020 15:30:12 -0400 Original-Received: by mail-lj1-x236.google.com with SMTP id n23so15116200ljh.7 for ; Sat, 20 Jun 2020 12:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b/+gwzjjtgelhwQpnOUKpOHx2iKbux5bcCc+xnoMtm8=; b=Z0aF5oBvil1vmNegbdtOE92Oq+bc9GJgZxbp1M+GcL3T/jZU7jdwQ693vnvXrltLoo /jIp8g47Wlg6m9q+gnyzoUdXUd00YtIioQYsblrarotbvED6eEw75P5xXb/PzUTTvpD5 rS0m38dqtWx8wWUlrBYpQvzVAF9fp/ETiAEMWJ9lzK+a28FiL1bM0s3Pdq7Gt02gP9N+ mzFzssCqE0jY/J1lydQUxZXbpohkZaNpESrktwGNSD0aOQePh7+Yhh2iFZYmXIvoCgwr JoJTD55H35S6+4i1wAs4Yh0tclptELFyeSkcQjWGf3UENcf5c3tBKxmPX9QLm+U05UJ0 aEsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b/+gwzjjtgelhwQpnOUKpOHx2iKbux5bcCc+xnoMtm8=; b=nU1c47r+vrZyqheeKTJRXwm9Xb+UqvkbDBOnFSQm9E0hZ4sqLVaKFwkIEC9TCO8V1k HMWdeT+jstDCJlZyaJiW3VjqIXp22aYqDoEHJBANMby6pJCUiezH7fQLSszn5rXA3RQN xxJn2VMnv7ePuODOk8h8Dj5/5kVM8GY48aGzejeYyjyHGAraacJL0K5OH5+X0aHhDWOp cFoHeI0eyghut387PbC4yLxiI4op7QVtqPQJSso2x84IFmV6lK2Ld8GZfSmzyBQuXOGF zS0HaJpzduc47yZMfnj9H2YjeFRIylPCTuYxvCazYxnTClT3w0wU/4Df1sYO7VsY+qwP u5ZA== X-Gm-Message-State: AOAM531iqKKP37uFdq2i4fQ99/RLrkpNLFwoDXE3bvlH2jLj1ZjOu6SG fsOtEiO3cvJOPtDyqau8WJD0FbhK8io3ybFyNEE= X-Google-Smtp-Source: ABdhPJzJY/K8JbaDjToRfvQzzsgf8ULLzUWpjSm38r6w3Bv03sGF/fNHfYVCtpKHYfJ4SIs/6q0ZiMB2sa+4zf4sK8Y= X-Received: by 2002:a2e:8ec9:: with SMTP id e9mr4976550ljl.152.1592681408636; Sat, 20 Jun 2020 12:30:08 -0700 (PDT) In-Reply-To: <87366pzh1a.fsf@gmx.de> Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=yyoncho@gmail.com; helo=mail-lj1-x236.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252459 Archived-At: --0000000000009a298305a88909ed Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 wrote: > yyoncho writes: > > > Here it is an example: > > > > Copy ls from /bin/ and name it lss. > > > > Then: > > > > ;; works > > (let ((default-directory "")) > > (executable-find "lss" 'remote)) > > > > ;; does not work > > (let ((default-directory "")) > > (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 =E2=80=98exe= c-path=E2=80=99". > 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 "")) > (executable-find "/bin/lss" 'remote)) > > where 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. > --0000000000009a298305a88909ed Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Michael,

Thank you,=C2=A0 this is en= ough for me to solve the original issue in lsp-mode repo.=C2=A0
<= br>
As a side note, if you do search for /bin/ls executable-find = will work=C2=A0
although it is not prefixed with the remote ident= ifier. This is what
confused=C2=A0me initially.

> Why do you want to give an
> absolute file name as argum= ent?

This is a configuration setting for lsp-m= ode when the server is located
on the remote server. Some users d= ont=C2=A0have admin access=C2=A0on the remote=C2=A0
machine so th= ey put the binary somewhere else so they have you use full
path.<= /div>

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>"))
>=C2=A0 =C2=A0(executable-find "lss" 'remote))
>
> ;; does not work
> (let ((default-directory "<remote-path>"))
>=C2=A0 =C2=A0(executable-find "/bin/lss" 'remote))

But this second example doesn't make sense. You want to know the path,<= br> 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 =E2=80=98= exec-path=E2=80=99".
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>"))
=C2=A0 (executable-find "<remote identification>/bin/lss" &= #39;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.
--0000000000009a298305a88909ed--