From: Arthur Miller <arthur.miller@live.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: Michael Perry <amperry@provide.net>, 52384@debbugs.gnu.org
Subject: bug#52384: 26.3; dired buffer navigation tweak
Date: Fri, 10 Dec 2021 08:13:44 +0100 [thread overview]
Message-ID: <AM9PR09MB4977ACE7D3370BA0956A47D796719@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <CADwFkmkMq2puntmghHbWrRJUhwMk33DXNkv-G0WiA=G4aaBLgg@mail.gmail.com> (Stefan Kangas's message of "Thu, 9 Dec 2021 17:36:04 -0800")
Stefan Kangas <stefan@marxist.se> writes:
> 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 ...')
>> and a trailing blank line. Those are a nuisance when navigating using
>> `M-<` and `M->'.
I have already raised this once, a year or two ago. Header in dired is quite
meaningless, for all these years I have ever never wanted to move cursor to
header in dired intentionally.
>> 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 have used those shortcut myself for quite some time, maybe a couple of years
or so. They are not so handy as I thought they would be. Mainly because I use
european keyboard, and have to fold in my thumb to access the M, and < and > are
next to shift key, so I have to move entire hand to reach those. I would rather
have Dired to use < and > to go to first and last 'filename' in dired, and M-<
and M-> to go to header. Or just jsut 'p' to go to header from the first line
with a filename, since I think it is so rarely used to actually go to header. I
guess header is useful if modeline is turned off?
> 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->.
Yes, in this case that would be better, and use < to move to first filename in
dired.
> 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.
>
Agree with that one too.
next prev parent reply other threads:[~2021-12-10 7:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 0:39 bug#52384: 26.3; dired buffer navigation tweak Michael Perry
2021-12-10 1:36 ` Stefan Kangas
2021-12-10 7:13 ` Arthur Miller [this message]
2021-12-10 17:11 ` bug#52384: [External] : " Drew Adams
2021-12-10 22:26 ` Arthur Miller
2021-12-10 22:52 ` Drew Adams
2021-12-11 14:08 ` Arthur Miller
2021-12-11 16:41 ` Drew Adams
2021-12-11 19:40 ` Juri Linkov
2021-12-11 22:06 ` Drew Adams
2021-12-12 8:41 ` Juri Linkov
2021-12-12 18:35 ` Drew Adams
2021-12-12 18:52 ` Juri Linkov
2021-12-12 19:15 ` Arthur Miller
2021-12-12 19:28 ` Juri Linkov
2021-12-12 19:37 ` Eli Zaretskii
2021-12-13 10:14 ` Arthur Miller
2021-12-13 12:24 ` Stefan Kangas
2021-12-13 16:29 ` Arthur Miller
2021-12-13 13:07 ` Eli Zaretskii
2021-12-13 16:21 ` Arthur Miller
2021-12-13 16:59 ` Eli Zaretskii
2021-12-13 17:11 ` Arthur Miller
2021-12-12 19:45 ` Drew Adams
2021-12-12 20:10 ` Juri Linkov
2021-12-10 12:00 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM9PR09MB4977ACE7D3370BA0956A47D796719@AM9PR09MB4977.eurprd09.prod.outlook.com \
--to=arthur.miller@live.com \
--cc=52384@debbugs.gnu.org \
--cc=amperry@provide.net \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).