From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: New functions remote-exec-path and remote-executable-find Date: Tue, 19 Jun 2018 10:16:10 +0200 Message-ID: <87h8lzfayd.fsf@gmx.de> References: <87po0oi0qa.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529396124 8463 195.159.176.226 (19 Jun 2018 08:15:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Jun 2018 08:15:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 19 10:15:19 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fVBnL-00027K-HN for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2018 10:15:19 +0200 Original-Received: from localhost ([::1]:39951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVBpS-0005hF-P1 for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2018 04:17:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVBoc-0005gz-Ty for emacs-devel@gnu.org; Tue, 19 Jun 2018 04:16:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVBoY-0005To-WA for emacs-devel@gnu.org; Tue, 19 Jun 2018 04:16:38 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:43911) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVBoY-0005Tc-MB for emacs-devel@gnu.org; Tue, 19 Jun 2018 04:16:34 -0400 Original-Received: from detlef.gmx.de ([212.86.38.114]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LslCb-1gB9Fs0RZ3-012Fg5; Tue, 19 Jun 2018 10:16:13 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 18 Jun 2018 21:19:51 -0400") X-Provags-ID: V03:K1:a/VLP9iTrOmgDzIqRG1XPy0dFFl3dSGFx8sNYHUWIYETD3TsSdr ntlFTfbUoO55yzJLcJWtTjXcEMwRkwq2LxA+OVFE34rCuWaciAWjGIBZO1nEnYSHPnec93e U/0a2r4Lszipf/DRgy7bf2oOr/DtvR4NYLv+LlZsjYB1DWqxh3D29nwRi+1XPXXL8CSlRH+ 8nwmaUbyPg3q6MfU4BfBQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:8UhTGZq+ZuQ=:JG83iPNi6/BWvyb+Yap3n7 WJd0oWACMA5i3zUlGWLbrzztfyCRs4RAmHkmOFdiK4i08dTG+ZjJdO0sqpe46bo6BhG0cZ9DN O/yWPyTP6ZtoGNwXccHzYr5eCo45qOF2AmajSdQh3wNUThpaay70iSVVwUsUSJ70Uto9fUxv6 FOpbobi+mmVP5nGVxXF41IFEo6dftjnj0+DiooQufAFJqYngkGfoKqI1UZ+JR/vXo8fjEzWdb FXsBCgDFkHVW6iW8n4A+MXY7jRlWAoZKt1y11SISMTaTf3/G2Itir/1WhVIsh+jWMNgW5QGO2 a29OhaCejaAEF3nZbXi8Gc6FdSWV7tlC4gHIpZ8jVr0OD+2ZsRzowJpzRlyi3dRG/SyroPsyZ Mg1RC2YHqn9lm9O5V2ZO8bMvJZT6zra+RFjN0n1ddi2EecfElmhx1sNTmRJOhdsg5HvErbVzH modUwy28PhguDUDTmJrYyCnV9XFyjmJYdpTqEWdFGsnnXSyDUx8Ehg1TUSDllnZk3rcKfXE29 Qlt/yJs2oBKQrYcKtFKxthNDxI0Xauq48Z8AYalXUuvZr8TBELjH1kQl68ddWSvIu/hmmYEjT GTSwSFKPkpabZCacywTzBexOyMbI/CCTy1iP7ErNO1hHfbqA7lvhc97NcF4VQSfGa5HSdVMle ZJk4HQlMJidDgIZ3FMtH11P6fYfEsRVpmz3khvc9efp/wWY0z66ADcepYBWb2VBUu/0zkaCw8 gyBJTiCfAZcIJRtAntSNG6+oVG3SM51pHiKsfgqghBcf6F8GHxRzGf7H24gvmZRItf9/Jjvj X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226496 Archived-At: Stefan Monnier writes: Hi Stefan, >> these days I'm working on bug#31704. The point is, that for searching of >> programs, always `exec-path' (a list of local directories) is taken, >> even if the shell runs on a remote host. Therefore, I propose a new >> function `remote-exec-path'. In case of a remote `default-directory', >> the function returns a list of directories which belong to that >> host. Implemented via file name handlers. For a local >> `default-directory', `exec-path' is returned. > > I think we could even name it just `exec-path`. IIRC they'd be built by > examining the $PATH of the remote shell, right? Yes, it's a better name. The value is not derived from the remote $PATH, but from `tramp-remote-path' The name `remote-executable-find' (or something else, different from `executable-find') must be kept. `executable-find' is supposed to work on the local host. > But I wonder: wouldn't there also be a need sometimes to *modify* these > (remote) exec-paths? Yes, perhaps. Until now there's even no such mean. Tramp uses internally the function `tramp-get-remote-path', which caches the result. Every cache cleanup will trigger to recalculate the result from `tramp-remote-path'. People could make that variable connection-local, and change it as needed. Let's see how this works in practice, and if needed, we could extend the interface. > Stefan Best regards, Michael.