emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New functions remote-exec-path and remote-executable-find


From: Michael Albinus
Subject: Re: New functions remote-exec-path and remote-executable-find
Date: Tue, 19 Jun 2018 10:16:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]