unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70593: 30.0.50; Dired: buffers of renamed dirs are broken
@ 2024-04-26 11:59 Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-04-26 14:55 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-26 11:59 UTC (permalink / raw)
  To: 70593


Hello,

I'm really, really happy that I finally nailed down this not
insignificant dired problem:

When you revert a dired buffer whose default-directory has been renamed,
the buffer is erased and an error message is displayed.  Marks and stuff
are permanently lost.  This even happens when the directory had been
renamed with means of dired.

It follows a recipe for emacs -Q; feel free to skip to the following
analysis of the problem... (we care about this case, but the code is
broken - see below)

[ Recipe:

I have two dired buffers, one showing "~", the other one a subdirectory
"~/test" in the other window.  You can put some trash files into that
directory and mark some of them.

Now I select the "~" dired buffer and enable wdired.  I rename "test"
to, say, "test1", and confirm.

Now select the other dired buffer.  The directory name in the first line
has even been updated.  But when I hit g, the buffer is erased and an
error is raised:

| insert-directory: Setting current directory: No such file or directory,
| /home/micha/test2/

Recipe end ]

The problem is that we partially fail to update the affected buffers.

The code wants to do this in `dired-rename-subdir-1':

    (if (equal dir default-directory)
	;; if top level directory was renamed, lots of things have to be
	;; updated:

DIR is the old directory name.  But the `equality' test fails simply
because default-directory is "~/test/" but DIR has the tilde expanded.


TIA,

Michael.







^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-05-21 22:43 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26 11:59 bug#70593: 30.0.50; Dired: buffers of renamed dirs are broken Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-26 14:55 ` Eli Zaretskii
2024-04-29 14:42   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 13:46     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 14:05       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 16:30       ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 19:27         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 21:20           ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 12:56             ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 13:08               ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 16:52                 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 16:51               ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 17:02                 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 18:32                   ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 14:29                     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-18 20:45   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-19  5:32     ` Eli Zaretskii
2024-05-21 22:43       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors

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).