From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#27631: dired a/*/b Date: Thu, 03 Aug 2017 11:48:54 -0400 Message-ID: References: <87o9sth2oi.fsf@jidanni.org> <8737a0yjbg.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1501775367 17806 195.159.176.226 (3 Aug 2017 15:49:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 Aug 2017 15:49:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27631@debbugs.gnu.org, Michael Albinus , =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 03 17:49:23 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 1ddINF-0004Js-QU for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Aug 2017 17:49:21 +0200 Original-Received: from localhost ([::1]:55212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddINL-0006NW-Ry for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Aug 2017 11:49:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddIN0-0006Cv-Ou for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 11:49:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddIMw-0003MD-MI for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 11:49:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddIMw-0003Ka-Ig for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 11:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ddIMv-0002QD-RN for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2017 11:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Aug 2017 15:49: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.15017753409302 (code B ref 27631); Thu, 03 Aug 2017 15:49:01 +0000 Original-Received: (at 27631) by debbugs.gnu.org; 3 Aug 2017 15:49:00 +0000 Original-Received: from localhost ([127.0.0.1]:40175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddIMu-0002Py-FR for submit@debbugs.gnu.org; Thu, 03 Aug 2017 11:49:00 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:49537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddIMs-0002Pp-GV for 27631@debbugs.gnu.org; Thu, 03 Aug 2017 11:48:59 -0400 Original-Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v73FmuCr002996; Thu, 3 Aug 2017 11:48:56 -0400 Original-Received: by lechazo.home (Postfix, from userid 20848) id 9A59560270; Thu, 3 Aug 2017 11:48:54 -0400 (EDT) In-Reply-To: (Tino Calancha's message of "Thu, 3 Aug 2017 13:38:37 +0900 (JST)") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6086=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6086> : inlines <6006> : streams <1757004> : uri <2475609> 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:135277 Archived-At: > Part of the complexity of the original patch is to provide this new > feature in _tramp_ connections as well; your patch does the thing > well (see patch below) in the local machine but it fails in remote ones. I didn't adjust the Tramp code accordingly, indeed. My patch probably also fails for ls-lisp (aka Windows). Both of those will need corresponding adjustments. My point is that it seems like we can get the same end-result without changing the structure. > @@ -1100,7 +1100,7 @@ dired-readin-insert > (while (not (file-directory-p dir)) > (setq dir (directory-file-name dir)) > (let ((n (file-name-nondirectory dir))) > - (setq file-list (mapcar (lambda (f) (concat n "/" f)) file-list))) > + (setq file-list (mapcar (lambda (f) (concat n (and (not (string= "" f)) "/") f)) file-list))) > (setq dir (file-name-directory dir))) > (setq default-directory dir)) > (if (and (equal "" (file-name-nondirectory dir)) `n` represents a directory name, so isn't it OK to have "/" rather than ""? Or is the above tweak purely cosmetic? > @@ -1335,9 +1337,7 @@ dired-insert-directory > (setq content-point (point))) > (when wildcard > ;; Insert "wildcard" line where "total" line would be for a full dir. > - (insert " wildcard " (or (cdr-safe (insert-directory-wildcard-in-dir-p dir)) > - (file-name-nondirectory dir)) > - "\n"))) > + (insert " wildcard " (car-safe file-list) "\n"))) > (dired-insert-set-properties content-point (point))))) Yes, my patch needs a bunch more cleanups: it was a quick hack job, just to confirm my intuition. Stefan