GNU bug report logs - #52384
26.3; dired buffer navigation tweak

Previous Next

Package: emacs;

Reported by: Michael Perry <amperry <at> provide.net>

Date: Thu, 9 Dec 2021 01:00:02 UTC

Severity: wishlist

Found in version 26.3

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Arthur Miller <arthur.miller <at> live.com>
Cc: "52384 <at> debbugs.gnu.org" <52384 <at> debbugs.gnu.org>, Stefan Kangas <stefan <at> marxist.se>, Michael Perry <amperry <at> provide.net>
Subject: bug#52384: [External] : bug#52384: 26.3; dired buffer navigation tweak
Date: Fri, 10 Dec 2021 22:52:03 +0000
> > 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.

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.

> 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.




This bug report was last modified 3 years and 247 days ago.

Previous Next


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