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


Message #10 received at 52384 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Michael Perry <amperry <at> provide.net>
Cc: 52384 <at> debbugs.gnu.org
Subject: Re: bug#52384: 26.3; dired buffer navigation tweak
Date: Thu, 9 Dec 2021 17:36:04 -0800
Michael Perry <amperry <at> provide.net> writes:

> When visiting a directory in dired-mode, you get not only a list of contents,
> but also a two-line header ('/path/to/directory' and 'total used ...')
> and a trailing blank line. Those are a nuisance when navigating using
> `M-<` and `M->'.
>
> Can I suggest the following become standard?
>
> (with-eval-after-load "dired"
>   (define-key dired-mode-map (kbd "M-<")
>     (lambda () (interactive) (beginning-of-buffer) (next-line 2)))
>   (define-key dired-mode-map (kbd "M->")
>     (lambda () (interactive) (end-of-buffer) (previous-line 1))))

I'm fine with that, but

a) I'd rather have something more general in place that works in more
   modes than just Dired.

b) I think you should be able to go to the absolute beginning or end of
   the buffer with a subsequent M-< or M->.

For example, in message-mode, I often want to do `message-goto-body',
but it would be nice if this would happen when I pressed M-< so I don't
need to remember a special key binding for every mode.

See the package beginend for previous work:

    https://github.com/DamienCassou/beginend

(Unfortunately, that package is not on GNU ELPA.)

> It's truly a small issue, but it's an irritation that multiplies over time.

Yup.




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

Previous Next


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