From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: server-local variables Date: Mon, 31 Oct 2016 13:31:15 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87a8dk77do.fsf@lifelogs.com> References: <87r36x7kb9.fsf@gmx.de> <87wpgoofp3.fsf@lifelogs.com> <87mvhk4h9c.fsf@gmx.de> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477937896 8786 195.159.176.226 (31 Oct 2016 18:18:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 31 Oct 2016 18:18:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 31 19:18:13 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1H9k-0000eY-W9 for ged-emacs-devel@m.gmane.org; Mon, 31 Oct 2016 19:18:01 +0100 Original-Received: from localhost ([::1]:37670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1H9n-0005cM-I4 for ged-emacs-devel@m.gmane.org; Mon, 31 Oct 2016 14:18:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1GRQ-0005Au-7t for emacs-devel@gnu.org; Mon, 31 Oct 2016 13:32:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1GRM-0001PU-14 for emacs-devel@gnu.org; Mon, 31 Oct 2016 13:32:12 -0400 Original-Received: from [195.159.176.226] (port=41226 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1GRL-0001PI-Qq for emacs-devel@gnu.org; Mon, 31 Oct 2016 13:32:07 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1c1GQk-0008Eo-FS for emacs-devel@gnu.org; Mon, 31 Oct 2016 18:31:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 63 Original-X-Complaints-To: usenet@blaine.gmane.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Cancel-Lock: sha1:62j0Q4pmiLVUXqaarWkXC32/GSQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209032 Archived-At: On Mon, 31 Oct 2016 17:26:07 +0100 Michael Albinus wrote: MA> Ted Zlatanov writes: >> That's very interesting. Some questions: >> >> * how are multiple classes merged? MA> (server-locals-set-class MA> "my-user@my-remote-host" 'remote-bash) MA> (server-locals-set-class MA> "my-user@my-remote-host" 'remote-nullfile) That seems awkward compared to (server-locals-set-classes CRITERIA CLASSES...) (in other words, I expect mixing classes to be the common case, so it should be easy). Otherwise the API looks reasonable to me :) >> * can classes be assigned by other means besides regexp? MA> No, not foreseen yet. I'd make it a regexp or a callable thing, that will cover 99% of the cases I can imagine. >> * why not an obarray? MA> See Stefan OK, it seemed like you were basically designing a scoped symbol table per connection, so an obarray seemed sensible. I haven't worked with them so it was just a question for my education. But if they are actively discouraged for most usage, the ELisp manual section on Creating Symbols should mention that. I was not aware. >> * a macro `with-process-classes' would be nice MA> How shall it look like? I'd use it in a process to widen or narrow permissions and environment: ...connect to a host, then... (with-process-classes temporary-sudo-override temporary-shell-override ansible-host-environment ...do something) It would take care of setting the connection-local variables inside the scope and unwinding them afterwards. MA> Process buffers are the first, obvious use case for this. But I don't MA> want to restrict it to them. People could use it also for setting other MA> local variables in any remote buffer, maybe even for specific modes. ... MA> But I still believe there will be non-Tramp use cases. As already said, MA> ange-ftp comes to mind. OK, please take a look at the GnuTLS glue code in gnutls.el and you'll see what I need from this facility. I'm happy to start using it there as soon as the API is solidified. I have a TODO item (discussed with Lars a few months ago) to implement something like this facility so it's great to see it's not an isolated need :) Ted