emacs-devel
[Top][All Lists]
Advanced

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

Re: INSIDE_EMACS and Tramp


From: Federico Tedin
Subject: Re: INSIDE_EMACS and Tramp
Date: Sat, 04 Apr 2020 22:13:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

> Tramp is the obvious victim, but I don't know whether it is the only
> package which will be mentioned in combination with another package in
> INSIDE_EMACS.
>
> Furthermore, in eshell or any other package you don't see what Tramp
> sets in the remote shell. I believe we need a mechanism where different
> packages add their settings (it's not only "shell" related, epg or
> compile say something different). And when this variable is set for a
> process, there must be a way to use these cumulated settings inside of
> just the value a single package want set.
>
> In the local case, this cumulative setting might be just the package
> name like "eshell".
>
> First we shall agree a common mechanism. Something which works exactly
> for eshel and Tramp isn't sufficient.

Aah OK, so then this mechanism for generating the value for INSIDE_EMACS
needs to be more general. How about something like:

(defvar inside-emacs-extras nil)

(defun inside-emacs (&optional context)
  (mapconcat #'identity `(,emacs-version
                          ,@(when context (list context))
                          ,@inside-emacs-extras)
             ","))

So in Eshell we would call (inside-emacs "eshell"), and Tramp could
optionally add "tramp:2.5.0-pre" to inside-emacs-extras sometime before
the function is called. Other parts of Emacs could add extras as well
(and at some point remove them, I suppose). Do you think something like
this would make sense given how Tramp works internally?



reply via email to

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