GNU bug report logs -
#27631
dired a/*/b
Previous Next
Full log
View this message in rfc822 format
> 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 "<n>/" rather
than "<n>"? 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
This bug report was last modified 7 years and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.