From: Drew Adams <drew.adams@oracle.com>
To: Dieter Faulbaum <mail@faulbaum.in-berlin.de>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : revert-buffer in dired
Date: Mon, 23 Dec 2024 16:39:46 +0000 [thread overview]
Message-ID: <DS7PR10MB5232F215E119E21EA11B01ECF3022@DS7PR10MB5232.namprd10.prod.outlook.com> (raw)
In-Reply-To: <rie1pxy9y2o.fsf@faulbaum.in-berlin.de>
> I think, it would be nice, if the newly introduced:
>
> *** Clicking on base name of directory reverts buffer.
> When 'dired-make-directory-clickable' is non-nil, clicking on the
> base name of the directory now reverts the Dired buffer.
>
> should not change the position of the cursor.
> Is this possible?
>
> The 'revert-buffer' in dired also changes the position of the
> cursor (to the filename of the "actual" line).
Do you mean that the cursor is moved from whatever
position it had to the beginning of the file name
of that _same line_?
Or do you mean that the cursor is moved from
wherever it was to a different line (at the
file-name beginning)?
> What is the idea of this?
If you mean the former (above), then this is the
standard movement location: beginning of file name.
It's what you get when you use `n' or `p', for
example. The current line is recorded as part of
a Dired buffer's state. The cursor position is not.
I can't speak authoritatively to the new vanilla
Dired breadcrumbs behavior about this. But if you
use Dired+ then what I describe above happens: the
cursor is placed on the same line, at the file-name
beginning.
___
A breadcrumbs difference wrt between vanilla Dired
and Dired+, I believe, is that the vanilla behavior
is that function `dired-revert' is always used,
instead of whatever function is currently the value
of `revert-buffer-function'.
For example, with Dired+ in a `find' Dired buffer,
clicking what you call the "base" name (the last
component of the absolute file name) runs the `find'
command again, to refresh its listing.
With vanilla Dired, I believe that even in a `find'
Dired buffer clicking there just lists the default
directory. I think using the `revert-buffer' of
the given buffer is more useful (e.g., in the case
of `find', redo the `find'). There are lots of
buffer modes that derive from `dired-mode', and
they sometimes have different revert functions.
To me, it makes sense for reverting them to use the
function defined for the specific mode.
___
Dired+ is here:
Doc: https://www.emacswiki.org/emacs/DiredPlus
Code: https://www.emacswiki.org/emacs/download/dired%2b.el
next prev parent reply other threads:[~2024-12-23 16:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-23 16:13 revert-buffer in dired Dieter Faulbaum
2024-12-23 16:39 ` Drew Adams [this message]
2024-12-24 9:34 ` [External] : " Dieter Faulbaum
2024-12-23 21:39 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-12-23 22:02 ` [External] : " Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DS7PR10MB5232F215E119E21EA11B01ECF3022@DS7PR10MB5232.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=mail@faulbaum.in-berlin.de \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.