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#31489: 25.3; Dired unable to open directory "/ssh:example.com" Date: Mon, 21 May 2018 19:53:55 +0200 Message-ID: <87efi4nbd8.fsf@gmx.de> References: <1526643719.9043.13.camel@gmail.com> <87zi0xkmua.fsf@gmx.de> <1526681772.32534.6.camel@gmail.com> <87zi0vms8v.fsf@gmx.de> <1526839932.4200.13.camel@gmail.com> <87muwu18pd.fsf@gmx.de> <1526843960.3021.12.camel@gmail.com> 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 1526925254 14043 195.159.176.226 (21 May 2018 17:54:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 May 2018 17:54:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31489@debbugs.gnu.org To: Christoph Michelbach Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 21 19:54:09 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 1fKp0a-0003Vj-J0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 May 2018 19:54:08 +0200 Original-Received: from localhost ([::1]:51797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fKp2g-0000ZS-2p for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 May 2018 13:56:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fKp1X-0007Ww-Jf for bug-gnu-emacs@gnu.org; Mon, 21 May 2018 13:55:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fKp1S-0006Wo-N1 for bug-gnu-emacs@gnu.org; Mon, 21 May 2018 13:55:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35316) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fKp1S-0006Wa-I4 for bug-gnu-emacs@gnu.org; Mon, 21 May 2018 13:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fKp1S-00059u-5J for bug-gnu-emacs@gnu.org; Mon, 21 May 2018 13:55:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <1526643719.9043.13.camel@gmail.com> Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 May 2018 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31489-submit@debbugs.gnu.org id=B31489.152692524419764 (code B ref 31489); Mon, 21 May 2018 17:55:02 +0000 Original-Received: (at 31489) by debbugs.gnu.org; 21 May 2018 17:54:04 +0000 Original-Received: from localhost ([127.0.0.1]:43213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fKp0W-00058h-Hf for submit@debbugs.gnu.org; Mon, 21 May 2018 13:54:04 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:48639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fKp0V-00058E-AD for 31489@debbugs.gnu.org; Mon, 21 May 2018 13:54:03 -0400 Original-Received: from detlef.gmx.de ([79.140.124.127]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lw2Sj-1gS6R70dtF-017pLs; Mon, 21 May 2018 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9fghu6zRha8kK97wKZmTz 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:146354 Archived-At: Christoph Michelbach writes: Hi Christoph, > On Sun, 2018-05-20 at 20:30 +0200, Michael Albinus wrote: >> You haven't answered my question: Could you live w/o Tramp, and set >> tramp-mode to nil? Or do you want still use Tramp, and I shall extend >> Tramp with an "exclude file names" feature? >> >> Both variants would be a solution for this. > > I haven't done so because I'm not suffering from this bug atm. I do use > tramp but I don't have the problem described in the bug report in > practice. I merely wanted to find out to what extent dired can be used > as a file browser and explored some edge cases. While doing so, I found > a few problems and this is the first one (and thus far only one found > while explicitly looking for bugs) I have reported. To evade the > problem in practice, one could simply use symlinks for the folders with > the weird names. Or one could use a single simlink created via > > sudo ln -s / /f > > and then always start at "/f". That was my first idea, when reading your bug report. But it doesn't work. `file-truename' would convert any file name "/f/ssh:example.com:/..." into "/ssh:example.com:/...", and we're back to the problem. > Evading this problem in practice is simple, but it seems to me that > HAVING to evade it shows poor usability. The problem is not related to dired. It comes from how file name handlers are designed in Emacs. They are active only based on the file *name*, not on anything else of the related file. That means, any file *name* which matched Tramp's remote file name syntax, activates Tramp. >>=C2=A0I don't see how this could be avoided. Of course, dired could quote= any >>=C2=A0directory name with "/:" when opening a directory with a file name >>=C2=A0dedicated to Tramp (or another file name handling library). But this >>=C2=A0would discard *any* file name handlers in this subdirectory, includ= ing >>=C2=A0something like uncrompressing files, as jka-compr does, or decrypti= ng >>=C2=A0files, whis is performed by epa. > > So the problem is that this way of quoting is also used in different > places, which means that it's not possible to view the contents of > "/ssh:example.com/tarball.tar" in Emacs without removing tramp / > disabling tramp / adding an exception for this specific path? Well, viewing the contents of a *.tar file is not performed via a file name handler, so it is possible to view the contents of "/:/tmp/foo.tar", for example. See the variable `file-name-handler-alist' for the file name handlers which are invoked via this mechanism, and which would be disabled by quoting a file name (prefixing it with "/:"). (On the contrary, in Emacs 27.0.50, viewing the contents of a tar file by the special file name syntax "/tmp/foo.tar/" could fail, when the file name is quoted like "/:/tmp/foo.tar/".) You might read (info "(elisp) Magic File Names") for further information about the underlying mechanism. --- Finally, I've pushed a patch to Emacs' master branch which should solve your problem. Add the following line to your .emacs: (setq tramp-ignored-file-name-regexp "\\`/ssh:example\\.com:") That's it. Tramp's documentation tells something about. Best regards, Michael.