From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#32090: Fwd: bug#32090: 26.1; connection-local-variables do not match as described Date: Sun, 08 Jul 2018 20:23:54 +0200 Message-ID: <877em5bn7p.fsf@gmx.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1531074189 17659 195.159.176.226 (8 Jul 2018 18:23:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2018 18:23:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 32090@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 08 20:23:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1fcEKu-0004Tq-GY for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jul 2018 20:23:04 +0200 Original-Received: from localhost ([::1]:37845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcEMz-0005Bv-SN for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jul 2018 14:25:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcEMt-0005AN-5B for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2018 14:25:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcEMo-000614-7G for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2018 14:25:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcEMo-00060q-2N for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2018 14:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fcEMn-0005Bl-NF for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2018 14:25:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jul 2018 18:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32090 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32090-submit@debbugs.gnu.org id=B32090.153107424419878 (code B ref 32090); Sun, 08 Jul 2018 18:25:01 +0000 Original-Received: (at 32090) by debbugs.gnu.org; 8 Jul 2018 18:24:04 +0000 Original-Received: from localhost ([127.0.0.1]:51397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcELr-0005AY-P8 for submit@debbugs.gnu.org; Sun, 08 Jul 2018 14:24:04 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:54499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcELp-0005A3-Lc for 32090@debbugs.gnu.org; Sun, 08 Jul 2018 14:24:02 -0400 Original-Received: from detlef.gmx.de ([212.91.242.147]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MLNpK-1fbg7N1jow-000YiR for <32090@debbugs.gnu.org>; Sun, 08 Jul 2018 20:23:55 +0200 X-Provags-ID: V03:K1:KxjG7e/irq3xMW5Bsi3dk9fZg/xkT42KYJiersYZD9dF3rhTkFq tu0nFRz2DADO/ghr4jzFXAb57bh3UOVwQw8pA498tOqbme6PpKiFKVNvoUc5nMf7DG5b7Zz DeY2lXm8nFr/fojKqfNMsVv81JZI8bLss1a6vHIZrAZDLchrlKZIdAWhAlec7xGzrYJKBvp W4Si2xeu0uBWhrdrvvGcg== X-UI-Out-Filterresults: notjunk:1;V01:K0:/k3aMLa2744=:En4F0XRIMnqbq5hLpshKQC 552fJHC3gumZbNWnCX7mFCWpyLVFn0b41HJLfAc7UKOKLix1qx05nuIGJeFrkInFDMEdY/sQK Mfz7SfWDYDH0ccClyzob3TJDO5pYbPOX/CTkLnl/9jZOoH6qpLB6lYgEJ/ZSOSQFSM7XLYLMz /iSiP2K+ZrsGIvBbutNQYIEx+g9+fVTMgdGJhz+ErdtisTCNN6tarQVM2UsgByr6OC+1b9pV5 nN4oqaYjVkEIWGJaLx1vX+G4gYHGt/Ka7+whJUmtFjKRq0Id+u6M24eQ/a93JgO59+J3VRWBs o1cQEUx6ZLfdYEkuzghUQiaXShNxwCBLZl3yLpghqTCfa2pRIMFKhjeAwuJCO8vTW6LfMUWh7 cLMvwjKM8VoWIMoT1j4huuv+sjom22wQA1lZHbCvBxKHesmQdR+120SAg8U3ouhi+iAr8xqRk PUa+6LDT5xlg3w5hg3G8pPQ/b9EMfizppxQxba0av7tXwd5nIdAiHZkrWBAJDka9vvZV6WNEp 4Nnbk/qFnD0VcwStRiCxBDaeApm04PI6N7qdIUQxscRRl32NtO0ICZzazFW6vqxYLGpJ9wE/R Tb9U8oGcm/Cpdp/WoU5HT8m/yPkZqG4AirXKIok9HsUW4yap42BoQ0lB0JlTW931WvSJ33PMP 74FAsRcTcZeMLLElry5YNE7Wf4+sFXBh5+IHnw9p/c1sFg5vANKTXThqJJjWwXFM3N0h3MDS4 VRZn1KhOTmI+LQwDFazxP8cdaDaWnW/mGvX8JrxpDN6VaRHfeQBR0yY9MePriZ08NlD7ixKJ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148354 Archived-At: -------------------- Start of forwarded message -------------------- From: Michael Albinus Subject: Re: bug#32090: 26.1; connection-local-variables do not match as de= scribed Date: Sun, 08 Jul 2018 17:16:42 +0200 Christopher Cooper writes: Hi Christoph, >>> (tramp-compat-funcall >>> 'hack-connection-local-variables-apply >>> `(:application tramp >>> :protocol ,(tramp-file-name-method vec) >>> :user ,(tramp-file-name-user-domain vec) >>> :machine ,(tramp-file-name-host-port vec))))) >>> --8<---------------cut here---------------end--------------->8--- >>> >>> That means, the Tramp implementation requires :application to be 'tramp >>> or nil, *and* it requires setting of :protocol, :user and :machine in >>> your criteria, which match the respective remote file name. >> >> This makes sense, except that I'm still confused on why :application >> can be nil but :protocol, :user, and :machine cannot be. Well, being also the Tramp maintainer, I have designed connection-local variables with Tramp in mind :-) Other packages have shown interest to use connection-local variables as well (nnimap, gnutls, if I'm not mistaken), but they haven't implemented it yet. And so there are no further feature requests. >> The Tramp info page seems pretty fine to me. The real issue is in two pl= aces: >> >> (info "(elisp) Connection Local Variables"): >>> -- Function: connection-local-set-profiles criteria &rest profiles >>> ... >>> All properties are optional; if >>> CRITERIA is =E2=80=98nil=E2=80=99, it always applies. >> >> But as determined above, if CRITERIA is 'nil', it does not always >> apply. It is up to the application to provide this feature, and Tramp >> does not. >> In fact, there is even an example showing this feature, which appears >> be plain wrong: >> >>> If CRITERIA is =E2=80=98nil=E2=80=99, it applies for all remote con= nections. >>> Therefore, the example above would be equivalent to >>> >>> (connection-local-set-profiles >>> '(:application 'tramp :protocol "ssh" :machine "localhost") >>> 'remote-bash) >>> >>> (connection-local-set-profiles >>> '(:application 'tramp :protocol "sudo" >>> :user "root" :machine "localhost") >>> 'remote-ksh) >>> >>> (connection-local-set-profiles >>> nil 'remote-null-device) >> >> At least with current Tramp, the 'remote-null-device profile will >> never apply, since it does not provide the properties needed by Tramp. >> This also means that this example is not equivalent to the above >> example as stated. Yes, that's an error. Will fix the documentation. >> The other place of confusion was the docstring for >> 'connection-local-criteria-alist' that I mentioned initially. >> >> I think ultimately, it comes down to a confusion over what "optional" >> means. I took it to mean: "It this property is provided, it will be >> checked when matching. If not, we don't care about the value of this >> property." And, as I stated earlier, I don't understand how the >> sentence "If CRITERIA is 'nil', it always applies." is try in any >> sense of those words. If the feature is working as intended, those are >> the worst offenders as far as confusing documentation. >> >> Once again, I appreciate this feature and your explanation here. I >> hope this is helpful in clarifying the documentation. Well, I'm also open to extend connection-local variables to other application's need but Tramp. Proposals welcome! The downside is, that such changes must go to the master branch (which will become Emacs 27.1). The emacs-26 branch is open for bug fixing only. >> Christopher Best regards, Michael. -------------------- End of forwarded message --------------------