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 21:23:15 +0300 Message-ID: References: <871rm9u5hw.fsf@gmail.com> <87blldzntb.fsf@gmx.de> <877dw1zl8y.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000b6fc905a8881b08" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="113271"; 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 20:24:02 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 1jmi9o-000TJI-Kf for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 20:24:00 +0200 Original-Received: from localhost ([::1]:59428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmi9n-0008RE-Hu for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 14:23:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmi9J-000826-TI for emacs-devel@gnu.org; Sat, 20 Jun 2020 14:23:29 -0400 Original-Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:45735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmi9I-00045V-3D for emacs-devel@gnu.org; Sat, 20 Jun 2020 14:23:29 -0400 Original-Received: by mail-lj1-x22f.google.com with SMTP id i27so14992500ljb.12 for ; Sat, 20 Jun 2020 11:23:27 -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=90Gc/FwYFt2VTPoqa2PDLYdZvaloK1/ouUqA9jcvgxQ=; b=ARjZaJEleM5Kc3BCm8plZpDvssLb8Hh5OAQaFxEZSZ72NHoY0E6IlObKRYw1bpQtbi FiXtBGcy0heRyG7yxxLpwyrtrINBEANCb4+lxQIKP6dfBxoVls4hs8RxtseJybwTgVMc 2mJoVavL25V5WfH472dY7fZhCn3E7v1VFMwGLiS3NsMbcHLqOp1R+qLdQ7Eytiz6MMS0 BSXRGQgJ6b+thPV7KQZU4ORc2buCrl9Pke2FMvPgdLXc2nil6R3NiHIoLAN73m0bT3Eg lb2IOUcysneGsHtp2/Ce85F8BUPMqsGtScbJrNOym/yRG1aCJNarWNlRn4XDCIQCWpKr cVRw== 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=90Gc/FwYFt2VTPoqa2PDLYdZvaloK1/ouUqA9jcvgxQ=; b=LwRJ32EPXVCmGsiRMfCKaHuZ4/6yVNIiJqT13Joz2tkBpAacHmDyiApWT2sb5yC/HH Ez4pOxOZSPmPnPj8OSo4QAZbjXxrQ2R659WvNKk2Qa10CVwFfh3OX5kPl75BSrGa6oxB CgGrwWlR8IX48BZdMQDkJNVkVICHxc4Gmnutj60NVSdFfwZMTPDxRu+dA6w4W22GPPdu 9yKttqOmdh3VcK9vx3QzspK1lv4/9k46rfzqwt4rZDBr4P9v9aexqRr8942QP4WgCnkw gp9GX883Gz62jpYMBiVZjf1kyCZoeklmngx6my1EA9PJ2eWZ3fiYicAhXKaZWwzCygYj swiQ== X-Gm-Message-State: AOAM531AivUPOD0q23INVgEQpIsHGHyYtnVP1lstcFsDhPnBkQloohJa AJppTE44ItumCajVmFmU6eDckDK0/k6LcwUrhlg= X-Google-Smtp-Source: ABdhPJzQOyN2iltfj+D9tZYEVaRz6PVXeqNdtWqcQ8lAnECKIW1Wapf98jO9fPdySLnhZ+EM2paNxT7bKYUUWHdWZe8= X-Received: by 2002:a2e:571b:: with SMTP id l27mr4931077ljb.308.1592677406305; Sat, 20 Jun 2020 11:23:26 -0700 (PDT) In-Reply-To: <877dw1zl8y.fsf@gmx.de> Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=yyoncho@gmail.com; helo=mail-lj1-x22f.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:252454 Archived-At: --0000000000000b6fc905a8881b08 Content-Type: text/plain; charset="UTF-8" Hi Michael, The examples that do not work on my side are when using a full file path when the binary is not on remote PATH. Thanks, Ivan On Sat, Jun 20, 2020 at 8:43 PM Michael Albinus wrote: > yyoncho 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. > --0000000000000b6fc905a8881b08 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Michael,

The examples that do not wo= rk on my side are when using a full
file path when the binary is = not on remote PATH.

Thanks,
Ivan

On= Sat, Jun 20, 2020 at 8:43 PM Michael Albinus <michael.albinus@gmx.de> wrote:
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/iss= ues/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 th= e
>> 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"))
=C2=A0 (executable-find "emacs"))
"/usr/local/bin/emacs"

(let ((default-directory "/tmp"))
=C2=A0 (executable-find "emacs" 'remote))
"/usr/local/bin/emacs"

(let ((default-directory "/ssh:ford:"))
=C2=A0 (executable-find "emacs"))
"/usr/local/bin/emacs"

(let ((default-directory "/ssh:ford:"))
=C2=A0 (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 sear= ch.

> Thanks,
> Ivan

Best regards, Michael.
--0000000000000b6fc905a8881b08--