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#27631: dired a/*/b Date: Fri, 14 Jul 2017 11:30:01 +0200 Message-ID: <87mv87pdra.fsf@detlef> References: <87o9sth2oi.fsf@jidanni.org> <877ezcxtd3.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1500024679 8816 195.159.176.226 (14 Jul 2017 09:31:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2017 09:31:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27631@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 14 11:31:14 2017 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 1dVwwI-0001vR-S7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 11:31:11 +0200 Original-Received: from localhost ([::1]:36487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwwO-0008B9-2i for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 05:31:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVwwD-00089s-5E for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 05:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVwwA-00034n-1Q for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 05:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVww9-00034V-UX for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 05:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVww9-00019l-JW for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 05:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2017 09:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27631-submit@debbugs.gnu.org id=B27631.15000246114389 (code B ref 27631); Fri, 14 Jul 2017 09:31:01 +0000 Original-Received: (at 27631) by debbugs.gnu.org; 14 Jul 2017 09:30:11 +0000 Original-Received: from localhost ([127.0.0.1]:37743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVwvL-00018j-5X for submit@debbugs.gnu.org; Fri, 14 Jul 2017 05:30:11 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:59739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVwvJ-00017f-LS for 27631@debbugs.gnu.org; Fri, 14 Jul 2017 05:30:10 -0400 Original-Received: from detlef.gmx.de ([79.140.120.145]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MJFBe-1dUHxY3KFm-002oYR; Fri, 14 Jul 2017 11:30:02 +0200 In-Reply-To: <877ezcxtd3.fsf@calancha-pc> (Tino Calancha's message of "Fri, 14 Jul 2017 00:13:28 +0900") X-Provags-ID: V03:K0:EngBqGQ057dcflyak1XM33ieHybDXxTp6zv/SCiCuKz+lHIl4/K SNEiysLBeS4Z2FOxBvc4K0TNzqYOVW14C6QdJI2kqxFL1fVXyG12hyyGIoKbreAkJ+dixPt BwXWIxkDDuRte0ncZKhLo1+5cZRms6OdYXW9mLPtMj3xObpgb4/lbTTFImD8aXwGprcu+eg v9HftoQu/lMhkxsSr2x9w== X-UI-Out-Filterresults: notjunk:1;V01:K0:SHiwqP8+8Zo=:DvoPfGh9aaLjvT30QqMYG/ DnNi+gQXGTf6yz8b7up9kmnwzl5ZWvlNUstN7Bg/V3I5+3cHZV8WHuSfNJBL3Bl/D88w+hdO+ 1kz7CBRJYD1kFextvvA6G0vE3H05Px/9Fpp+Ymu5K4gk26GVHF6MZqkyLXa+/CHCx1eSOm870 GQa/bOMr2MLFCJx0JgQEMMkLSd56akT53Uhy00y5iRY49OhmFTXJZF7YjDtyHHbwa4Qjka6gO I75ObKFGLfz39BhNva/jp88rIa5nIRVNkqehzuazIZVLckeA2MpQun+LPHrG/sgHRl+7bQl63 0dSsHbsHidtQ/So2oW8wL7gklZQY0e3vvPY4SWBRBr9Zdz2pni2Uj0D5ZcKyMM8ahYAr8eiHq EaEkvSeP3yqgGA8nKUeImRGFwrCWFXK9VFHvqQLqeWiV4sBxHrExBy48/Tn/4bUCxgsfsYKuw at13thHCNtosB9GUHgfx2SW7NN/1bcDn5fCBCr7l+S/1tX4Vur7SQz0ojR1Y9O0lsdDBs7aph BVrD9R1XvH9t/jByiPVcW++9Z4Xdpwphzen32Samb7/DbABeb/vCDp3pj8aCDrmobHyJCS2M6 oLkPUqlsH/0TICA0fVfLMam6gUDFDMEiYt7r1zu9JZt+yP+sVXdzao5X6/cm5ufjPrWKEM40b lcq4Qe8r7CYTXM6qU/orygWmQhrp5Si0l9Va7SBmSu8uT2Z2c3pTjJZz1oUg/LQhkKr4l+k3J DEawI5BRD/PGLOmKxvo4/pL+uvW/yn33s8DM8Qas+S8NPK7IIDSESu8d3wBprR54a5Z1vk3E 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:134538 Archived-At: Tino Calancha writes: > Hi Michael, > i'd like to provide Tramp support for this new Dired feature. > The implementation is fairly straight: just adds a function > 'insert-directory-wildcard-in-dir-p' in files.el, and use it in > 'insert-directory' and Dired. > > To get Tramp support i've added a handler > 'tramp-sh-handle-insert-directory-wildcard-in-dir-p'. > Is this procedure OK or i am doing something weird? That's not sufficient, it takes much more for adding a new handler in Tramp. At least, it must be declared in tramp.el, and it must also be added to the other backends but tramp-sh.el. And you can also not call it directly; Tramp is backwards compatible with Emacs 24 and 25. > +(defun insert-directory-wildcard-in-dir-p (dir) > + (when (string-match "[*]" (file-name-directory dir)) > + (let ((regexp "\\`\\([^*]+/\\)\\([^*]*[*].*\\)")) > + (string-match regexp dir) > + (cons (match-string 1 dir) (match-string 2 dir))))) Unfortunately, there's no docstring, so it isn't clear to me what you expect as result. Reading `tramp-sh-handle-insert-directory-wildcard-in-dir-p', I believe you just want to work over the local part of a remote file name. So you could do at the beginning: ;; DIR could be remote. (setq dir (file-local-name dir)) And I don't believe that it is mandatory to call `insert-directory-wildcard-in-dir-p' in Tramp. All what's needed could be done outside Tramp file name handlers. . > Best regards, > Tino Best regards, Michael.