[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired: make dired-maybe-insert-subdir always skip trivial files
From: |
Juri Linkov |
Subject: |
Re: dired: make dired-maybe-insert-subdir always skip trivial files |
Date: |
Thu, 25 Dec 2014 21:32:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) |
> When `dired-maybe-insert-subdir' is called on a subdir not yet present
> in the dired buffer, it inserts that subdir and skips to a first
> "non-trivial" file.
>
> But when it is already present, the point jumps to the header line and
> stays there.
>
> Below is the fix which makes it select the first non-trivial file
> always. Is it ok to apply?
I agree it would be good to make it consistent for both cases:
when it is already present and not present, especially good after fixing
http://debbugs.gnu.org/19436
> - (dired-goto-subdir dirname))
> + (when (dired-goto-subdir dirname)
> + (unless (dired-subdir-hidden-p dirname)
> + (dired-initial-position dirname))
> + t))
Why do you always return t? Wouldn't it be better to use something like
(prog1 (dired-goto-subdir dirname) (unless ...))