* revert-buffer in dired @ 2024-12-23 16:13 Dieter Faulbaum 2024-12-23 16:39 ` [External] : " Drew Adams 2024-12-23 21:39 ` Michael Heerdegen via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 5+ messages in thread From: Dieter Faulbaum @ 2024-12-23 16:13 UTC (permalink / raw) To: help-gnu-emacs@gnu.org 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). What is the idea of this? The revert-buffer with a file doesn't do this (if the file becomes greater (from "outside")). ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [External] : revert-buffer in dired 2024-12-23 16:13 revert-buffer in dired Dieter Faulbaum @ 2024-12-23 16:39 ` Drew Adams 2024-12-24 9:34 ` Dieter Faulbaum 2024-12-23 21:39 ` Michael Heerdegen via Users list for the GNU Emacs text editor 1 sibling, 1 reply; 5+ messages in thread From: Drew Adams @ 2024-12-23 16:39 UTC (permalink / raw) To: Dieter Faulbaum, help-gnu-emacs@gnu.org > 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [External] : revert-buffer in dired 2024-12-23 16:39 ` [External] : " Drew Adams @ 2024-12-24 9:34 ` Dieter Faulbaum 0 siblings, 0 replies; 5+ messages in thread From: Dieter Faulbaum @ 2024-12-24 9:34 UTC (permalink / raw) To: help-gnu-emacs@gnu.org Yes, I mean the changing of the cursor position to "bob". But I think that changing the position to the beginning of the file name is not a bug but maybe unnecessary. But I can "live with that".-) Thank for "accepting" this as a bug (and repairing it). I don't use Dired+ (anymore, but have forgotten my reason,-) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: revert-buffer in dired 2024-12-23 16:13 revert-buffer in dired Dieter Faulbaum 2024-12-23 16:39 ` [External] : " Drew Adams @ 2024-12-23 21:39 ` Michael Heerdegen via Users list for the GNU Emacs text editor 2024-12-23 22:02 ` [External] : " Drew Adams 1 sibling, 1 reply; 5+ messages in thread From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-12-23 21:39 UTC (permalink / raw) To: help-gnu-emacs Dieter Faulbaum <mail@faulbaum.in-berlin.de> writes: > 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? I wrote a note to the bug report where this change had been discussed - you are CC'd. > The 'revert-buffer' in dired also changes the position of the cursor > (to the filename of the "actual" line). > What is the idea of this? Dired saves a lot of information to restore for reverting. Since the file name point is on can appear on a different line after reverting, we save the file name and, I think, don't care about the position to a finer degree since it is not really relevant for the sake of dired commands. Michael. ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [External] : Re: revert-buffer in dired 2024-12-23 21:39 ` Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-12-23 22:02 ` Drew Adams 0 siblings, 0 replies; 5+ messages in thread From: Drew Adams @ 2024-12-23 22:02 UTC (permalink / raw) To: Michael Heerdegen, help-gnu-emacs@gnu.org > I wrote a note to the bug report where this change had been discussed - > you are CC'd. That note is here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74700#34 I see from your note there that the OP here wasn't complaining that the cursor position changes to the beginning of the file name, on the same line; OP here was saying that it changes to the _buffer_ beginning (bob). That indeed sounds like a bug. FWIW, my code in Dired+ doesn't have that problem. It puts the cursor on the same line as it was, but at the beginning of the file name (like ordinary reverting in Dired). > > The 'revert-buffer' in dired also changes the position > > of the cursor (to the filename of the "actual" line). > > What is the idea of this? > > Dired saves a lot of information to restore for reverting. Since the > file name point is on can appear on a different line after reverting, we > save the file name and, I think, don't care about the position to a finer > degree since it is not really relevant for the sake of dired commands. Yes. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-24 9:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-12-23 16:13 revert-buffer in dired Dieter Faulbaum 2024-12-23 16:39 ` [External] : " Drew Adams 2024-12-24 9:34 ` 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
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).