Subject: Re: [External] : bug#52384: 26.3; dired buffer navigation tweak

From: Arthur Miller <[email-masked]>
Date: Sat, 11 Dec 2021 15:08:49 +0100

Drew Adams <[email-masked]> writes:

>> > My 2c:
>> > Leave `<' and `>' alone, letting them move to
>> > the previous/next directory file line.
>> 
>> If you keep directories sorted before or after files then < and > become
>> almost redundant, since 'p' and 'n' will have same effect in practice.
>
> For some meaning of "almost".
>
>> I say almost, because there is instance when one is deep below in files
>> and would like to jump do directories (when sorted before). So pressing
>> '<' would take you to the last directory before files listing begin, and
>> than one can use either p/n or </> to move cursor.
>
> That's far from the only case/difference.
>
> `<' and `>' move only among dir-header lines.
Yeah I know. 
> They do that wherever those lines might be.
> Including for inserted subdirs.
>
> If you never insert subdir listings, and you
> always list dir lines first, then, within that
> block of dir headers (only), yes, `<' and `>' act
> like `p' and `n'.  That's one case out of many.
>
>> I also think dired should use by default
>> --group-directories-first/ls-lisp-dirs-first...
>
> Please file a separate enhancement request for
> that, if you like.
>
>> > (The Dired+ versions of these commands wrap
>> > around, if option `diredp-wrap-around-flag'
>> > has its default value of `t'.)
>> 
>> I would suggest this option to make it's way into Emacs. Can't you suggest a
>> patch? Windmove has similar option for moving left-right windows to wrap
>> around.
>
> Giving such behavior to vanilla Emacs is trivial.
> And I likely did propose it long ago, and there's
> a chance I even provided code for it.  In any case,
> the code isn't hard.
I don't think it is hard to code; it was just you already made it in
dired+, so it's your code, your thing, your patch :).

>> It would be handy if 'p' and 'n' and '<' and '>' would behave
>> similarly.
>
> `p' and `n' do behave similarly, based on the same
> user option.  And yes, I generally do provide
> wraparound navigation etc. in my code.  It usually
> makes sense to do so.
Yes, It would be nice if Emacs had consistent "wrap around" for more
things, as an option of course; like in windmove.el.