[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: server-local variables
From: |
Michael Albinus |
Subject: |
Re: server-local variables |
Date: |
Mon, 31 Oct 2016 17:26:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Ted Zlatanov <address@hidden> writes:
> That's very interesting. Some questions:
>
> * how are multiple classes merged?
Several calls of `server-locals-set-class-variables', like this:
--8<---------------cut here---------------start------------->8---
(server-locals-set-class-variables
'remote-bash
'((shell-file-name . "/bin/bash")
;; Command line switch.
(shell-command-switch . "-c")
;; Command line switch.
(shell-interactive-switch . "-i")
;; Login shell switch.
(shell-login-switch . "--login")))
(server-locals-set-class-variables
'remote-nullfile
'((nullfile . "/dev/null")))
(server-locals-set-class
"address@hidden" 'remote-bash)
(server-locals-set-class
"address@hidden" 'remote-nullfile)
--8<---------------cut here---------------end--------------->8---
And for another user, you could apply the same class, or another one:
--8<---------------cut here---------------start------------->8---
(server-locals-set-class-variables
'remote-ksh
'((shell-file-name . "/bin/ksh")
...))
(server-locals-set-class
"address@hidden" 'remote-ksh)
(server-locals-set-class
"address@hidden" 'remote-nullfile)
--8<---------------cut here---------------end--------------->8---
> * can classes be assigned by other means besides regexp?
No, not foreseen yet.
> * why not an obarray?
See Stefan
> * a macro `with-process-classes' would be nice
How shall it look like?
> 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.
Process buffers are the first, obvious use case for this. But I don't
want to restrict it to them. People could use it also for setting other
local variables in any remote buffer, maybe even for specific modes.
> Ted
Best regards, Michael.
Re: server-local variables, Ted Zlatanov, 2016/10/31
Re: server-local variables,
Michael Albinus <=