From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#27631: dired a/*/b Date: Fri, 4 Aug 2017 14:12:32 +0900 (JST) 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; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1501823595 12667 195.159.176.226 (4 Aug 2017 05:13:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Aug 2017 05:13:15 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: 27631@debbugs.gnu.org, Tino Calancha , Michael Albinus , =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 04 07:13:10 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 1ddUv4-0002p1-FX for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Aug 2017 07:13:06 +0200 Original-Received: from localhost ([::1]:34415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddUvA-0008No-AL for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Aug 2017 01:13:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddUv3-0008Mz-Is for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2017 01:13:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddUv0-0002Vq-Si for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2017 01:13:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddUv0-0002Vc-Om for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2017 01:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ddUv0-00042z-G8 for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2017 01:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 05:13:02 +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.150182356515532 (code B ref 27631); Fri, 04 Aug 2017 05:13:02 +0000 Original-Received: (at 27631) by debbugs.gnu.org; 4 Aug 2017 05:12:45 +0000 Original-Received: from localhost ([127.0.0.1]:40683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddUuj-00042S-77 for submit@debbugs.gnu.org; Fri, 04 Aug 2017 01:12:45 -0400 Original-Received: from mail-pf0-f195.google.com ([209.85.192.195]:33741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddUuh-00042C-HO for 27631@debbugs.gnu.org; Fri, 04 Aug 2017 01:12:43 -0400 Original-Received: by mail-pf0-f195.google.com with SMTP id c65so805721pfl.0 for <27631@debbugs.gnu.org>; Thu, 03 Aug 2017 22:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=lmF3Le4BZogelay6sjxNh7wNrqJu1dN7oJWLXTH6sDM=; b=d24J9lN97aII/tCnhlda+3irQ2Id0bShfJv1lufooaGO4sGsIYbhS12q9W3Hcr7Lps tvEVd92zevwPZcPXasjyxiwIwhRNlEl2PbR+2xVNOVUggLOYrLHgdU/hxsDj0o3OQX5z yqJaoMSRgDMYYMpVX43lOnoaaQW1Cbi5k3XTbScCXKNXWuBh4/zCGxATbweDnEOx46au dCzwfI2XgQbxgP3b36Ayd9KMSlpZ+YD1M34H6cRvYJT4OnCNvYyCfiZwR+NQORf42cT9 2rPMsNOslvt8i+37idzw3jWOmA/UOWCIvTGB5vtBtirwhFeVxfeNH8Qejk9lEb9e3D0W Y9iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=lmF3Le4BZogelay6sjxNh7wNrqJu1dN7oJWLXTH6sDM=; b=C4XrhyTwHrdfBDjJbxhNjf4A9UILN790Av+OOymn8Q0Aw0NAggn2/2YJ+qGUudsafK Sagv0QHLdFlNb34R+brvoiJ0ltEN1C2dRqTWiwi3Pd6isBLGhyuC24K7s2pYxEeUJ7aA JcPTQcvCa491Pwu8X6pftF8cPRJjxEnGA4N6LkqxRuBSyUG6hv+sk4nWKRyApnAe1kp5 ZfNsfO5xCbk1479w2It08xQRlXSvaoLU2rNMWpWI6pkGB29PMHGnePQaB+rGp06k1qYs HeXsBJ6+r1BMbTMkuxt3oOYL7GZriFwDqtQC5DETwm9VFfp0H4Cnk5Z2hiG1/k2O/+8B QGOg== X-Gm-Message-State: AIVw113hCZIIJXW13PMecjSdS2j09XlAKqnDuWah7xSvId7Hpg/cEEEQ 8GZppxl3cBqk1A== X-Received: by 10.99.189.10 with SMTP id a10mr1095715pgf.271.1501823557768; Thu, 03 Aug 2017 22:12:37 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id y2sm880251pfy.119.2017.08.03.22.12.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 22:12:36 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: 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:135316 Archived-At: On Thu, 3 Aug 2017, Stefan Monnier wrote: >> 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. Maybe that's the reason why this feature didn't exit before: people found it wasn't straight to implemented it for everything: local and remote connections, external or emulated 'ls'. Now we have it, but you are very welcome to rewrite it so that it fits in the original structure. I am volunteer to be the patch tester! >> @@ -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? No cosmetic, i need it, otherwise i get an error if i eval the form: (dired (expand-file-name "lisp/*.el" source-directory)) Debugger entered--Lisp error: (file-missing "Reading directory" "No such file or directory" "*.el/") access-file("*.el/" "Reading directory") insert-directory("*.el/" "--dired -al" t nil) dired-insert-directory("/home/calancha/soft/emacs-master/lisp/" "-al" ("*.el/") t t) dired-readin-insert() dired-readin() dired-internal-noselect("~/soft/emacs-master/lisp/*.el" nil) dired-noselect("/home/calancha/soft/emacs-master/lisp/*.el" nil) dired("/home/calancha/soft/emacs-master/lisp/*.el") eval((dired (expand-file-name "lisp/*.el" source-directory)) nil) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-sexp)