GNU bug report logs - #27631
dired a/*/b

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 9 Jul 2017 18:44:01 UTC

Severity: minor

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #79 received at 27631 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 27631 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 Michael Albinus <michael.albinus <at> gmx.de>, Eli Zaretskii <eliz <at> gnu.org>,
 Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#27631: dired a/*/b
Date: Fri, 4 Aug 2017 14:12:32 +0900 (JST)

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 "<n>/" rather
> than "<n>"?  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)




This bug report was last modified 7 years and 295 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.