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

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

bug#52384: 26.3; dired buffer navigation tweak


From: Lars Ingebrigtsen
Subject: bug#52384: 26.3; dired buffer navigation tweak
Date: Fri, 10 Dec 2021 13:00:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael Perry <amperry@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 ...') 

(The second line has been removed in Emacs 29, and the first line has
been made useful in Emacs 28 (you can now click on the segments).)

> 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)))) 
>
> It's truly a small issue, but it's an irritation that multiplies over time. 

I don't think we should do something like this in Dired buffers (or
anywhere else, for that matter).  I want commands like `M-<' to be
predictable across modes, and I certainly don't want `M->' to take me to
the start of the last line.  (What if I want to copy the region to the
clipboard, for instance?)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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