emacs-devel
[Top][All Lists]
Advanced

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

Re: server-local variables


From: Ted Zlatanov
Subject: Re: server-local variables
Date: Mon, 31 Oct 2016 08:39:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Sun, 30 Oct 2016 19:39:38 +0100 Michael Albinus <address@hidden> wrote: 

MA> With these functions, one could write the following code snippet,
MA> pushing a server-local variable `some-useful-setting' for all remote
MA> connections using the "sudo" method:

MA> (server-locals-set-class-variables
MA>  'remote '((some-useful-setting . some-useful-value)))

MA> (server-locals-set-class "^/sudo:" 'remote)

MA> ;; This must be applied in a buffer with remote `default-directory'.
MA> (hack-server-local-variables-apply)

That's very interesting. Some questions:

* how are multiple classes merged?
* can classes be assigned by other means besides regexp?
* why not an obarray?
* a macro `with-process-classes' would be nice

It seems like these are process-local variables, in the sense that you
may want them per address@hidden:port combination (or other process
parameters), not just hostname. Thus it may be better to make this a
process-level facility.

I think the GnuTLS code could use this facility as well. Right now
gnutls.el has ad-hoc facilities for this purpose, if I understand you
correctly.

Ted




reply via email to

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