bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27631: dired a/*/b


From: Stefan Monnier
Subject: bug#27631: dired a/*/b
Date: Thu, 03 Aug 2017 11:48:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]