unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: emacs-devel@gnu.org
Subject: Re: server-local variables
Date: Mon, 31 Oct 2016 17:26:07 +0100	[thread overview]
Message-ID: <87mvhk4h9c.fsf@gmx.de> (raw)
In-Reply-To: <87wpgoofp3.fsf@lifelogs.com> (Ted Zlatanov's message of "Mon, 31 Oct 2016 08:39:36 -0400")

Ted Zlatanov <tzz@lifelogs.com> 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
 "my-user@my-remote-host" 'remote-bash)
(server-locals-set-class
 "my-user@my-remote-host" '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
 "another-user@my-remote-host" 'remote-ksh)
(server-locals-set-class
 "another-user@my-remote-host" '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 user@host: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.



  parent reply	other threads:[~2016-10-31 16:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30 18:39 server-local variables Michael Albinus
2016-10-30 20:08 ` Eli Zaretskii
2016-10-30 20:28   ` Michael Albinus
2016-10-31  3:30     ` Eli Zaretskii
2016-10-31  9:54       ` Michael Albinus
2016-10-31 11:17         ` Phil Sainty
2016-10-31 12:45           ` Óscar Fuentes
2016-10-31 15:42           ` Michael Albinus
2016-10-31 20:15             ` Phil Sainty
2016-10-31 13:43         ` Stefan Monnier
2016-10-31 16:30           ` Michael Albinus
2016-10-31 12:39 ` Ted Zlatanov
2016-10-31 13:36   ` Stefan Monnier
2016-10-31 21:03     ` Drew Adams
2016-11-01  2:08       ` Stefan Monnier
2016-11-01  5:08         ` Drew Adams
2016-10-31 16:26   ` Michael Albinus [this message]
2016-10-31 17:31     ` Ted Zlatanov
2016-10-31 20:47       ` Michael Albinus
2016-11-01 13:22         ` Ted Zlatanov
2016-11-14 14:02           ` Michael Albinus
2016-11-15 15:02             ` GnuTLS per-connection variables (was: server-local variables) Ted Zlatanov
2016-11-24 12:50               ` GnuTLS per-connection variables Michael Albinus
2016-11-29 16:07                 ` Ted Zlatanov
2016-11-28 18:54               ` Michael Albinus
2016-12-05 15:09                 ` Michael Albinus
2016-12-05 16:27                   ` Ted Zlatanov
2016-12-05 16:49                     ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvhk4h9c.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).