From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: tramp and executable-find Date: Sat, 20 Jun 2020 19:43:09 +0200 Message-ID: <877dw1zl8y.fsf@gmx.de> References: <871rm9u5hw.fsf@gmail.com> <87blldzntb.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="88787"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel To: yyoncho Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 20 19:45:56 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 1jmhYy-000Mzi-2n for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 19:45:56 +0200 Original-Received: from localhost ([::1]:46068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmhYw-0003Z3-H6 for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 13:45:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmhWM-0001Fb-7m for emacs-devel@gnu.org; Sat, 20 Jun 2020 13:43:14 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:50255) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmhWK-0006jN-2W for emacs-devel@gnu.org; Sat, 20 Jun 2020 13:43:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592674990; bh=ZFJGrNYqTHESsTx+fh9A/jqrb/BNhdoc9pIPGWsfC/s=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=AHWKmMnwn08x6HtE4NpYezdrs1yvHn3EZ87DyBBteIpYKUkxDuSJg4r3dtLsp8Xal q9aeCKcRgFXIrsC9bCxg30LOA4C63WgLu0/jrEiJFt61BY4P3Kia9h/n3GsPMjWRxf yNG/Ygta21WheQhsvXfQ3bU3YJKz9HdAhTinlEYs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.148.8]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M4s0t-1jlKTS3ltH-0020ka; Sat, 20 Jun 2020 19:43:10 +0200 In-Reply-To: (yyoncho@gmail.com's message of "Sat, 20 Jun 2020 20:08:06 +0300") X-Provags-ID: V03:K1:MN+WJE0BhAk2cr6MNzJhyJ24YtWWnWwTbSYi8z7MyY+EbymwVR/ bukWevF522s5gHEFJ3HWOTNfl5vRAvDWxJKG/f+gxxS7L0kpWmPGJh49C7MjIGLlSu6dRlA oxBTUDIysGs5pUv2mAai2U3p4cEuroZ3IoI2KbBnekZJnbqWeYkkRcU9hcjKo7T4sHEI4kN +RWcNvvsiR5376OCK9cXA== X-UI-Out-Filterresults: notjunk:1;V03:K0:z4TsyOuYFx4=:fqlr4mFMsJOd5CiuD1qZ/y kQrWOaQzAaRqtcRDiXPqHKbZT9KT8arNd4B/RurlvlwfSh+B4r+0FT2CFTmYuXRS2e7ACHJJu bVhZ68CXpY1CpTvs5S72u6dWrC/X3mk7X6+11cjyQpM6wSqJBKP4khQlAsps3sSqLdbszc88j PxrGiWMktd/lum01zG2iz8IR7n5ZR//GQ+2e5D6+UtCJKMy/wuLhdWg3ycqkNmyq21siPac4H ZJeqdLk6ENWDZCsb7ULwUNWw2MIJokK9xz7RUN1v3pwCT0SsNcdEhghZyk/rjftpbsbiihj6x fDS8pnO5jhFJQefe0ZudwMfT4zeVB3VMe6E4g5XVPxSQwoJ0J3FNv7yGPxO3zjkhyvFIvS1Z2 fjwg9zqTd1YIilZwqhumTZlEd//cDjnxmKlx3A0Gt59CUaAX1w/rwqc5SLClEL37CTH9EYUwc ipldeWpd/Xb0GSoSO6N1b0udERQ4ANqKfoRIMAvchHzO/7YPV38k7dmrz4No4MyXHt4waZMRq XA7/xVktJ9vWmtGpTvIo550IIAVFvbLjZCaobIeMunHuWLgjrNjJeQRB/e+YsjcpncSebMp+C aB/UfSaT/sO69cVyxLYfgp1DQNLkclbMlWwJZHKY/SgrI5m6ibV7uKQwu7+/nDLVwDfpfskhy byyeUjiVUzmiy6kDe4htFSBS3toh2YGu0cpqDCHaC9Xz9g9CM+lnNWVd1NWQtGJs8JDDuosIy qoTLQeIr4LRshKl+F5Xn2R2rKqfFP73mQUFElre/NgNoZDZN4olWEJVlgLAGKkLW054mUIY4 Received-SPF: pass client-ip=212.227.17.22; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/20 13:43:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, 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:252452 Archived-At: 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 =2D-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" =2D-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.