unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Possible regression in dired when renaming directories
@ 2022-04-10 13:28 Nicolas Martyanoff
  2022-04-10 14:00 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Martyanoff @ 2022-04-10 13:28 UTC (permalink / raw)
  To: emacs-devel


Hi,

I just updated from 27.2 to 28.1, and it seems a default behaviour has
changed. When renaming a directory in dired, either using 'R' or with
Wdired, buffers visiting files in this directory are not modified so
that they visit the file at the new location.

I reproduced the problem with emacs -q,  and I cannot find anything
about it in NEWS.28.

Was that an intended change ? If yes, is there a way to get back the old
behaviour? This is an incredibly useful feature; without it, I have to
kill all buffers visiting files in the directory and re-open them.

Regards,

-- 
Nicolas Martyanoff
http://snowsyn.net
khaelin@gmail.com



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

* Re: Possible regression in dired when renaming directories
  2022-04-10 13:28 Possible regression in dired when renaming directories Nicolas Martyanoff
@ 2022-04-10 14:00 ` Eli Zaretskii
  2022-04-10 14:49   ` Nicolas Martyanoff
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2022-04-10 14:00 UTC (permalink / raw)
  To: Nicolas Martyanoff; +Cc: emacs-devel

> From: Nicolas Martyanoff <khaelin@gmail.com>
> Date: Sun, 10 Apr 2022 15:28:13 +0200
> 
> I just updated from 27.2 to 28.1, and it seems a default behaviour has
> changed. When renaming a directory in dired, either using 'R' or with
> Wdired, buffers visiting files in this directory are not modified so
> that they visit the file at the new location.

I cannot reproduce this.  I tried R in Dired, and Emacs 28.1 works the
same as 27.2 here.

Can you provide a complete recipe starting from "emacs -Q" to
reproduce the problem?



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

* Re: Possible regression in dired when renaming directories
  2022-04-10 14:00 ` Eli Zaretskii
@ 2022-04-10 14:49   ` Nicolas Martyanoff
  2022-04-10 14:58     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Martyanoff @ 2022-04-10 14:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Nicolas Martyanoff, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:
> I cannot reproduce this.  I tried R in Dired, and Emacs 28.1 works the
> same as 27.2 here.
>
> Can you provide a complete recipe starting from "emacs -Q" to
> reproduce the problem?

Running emacs -Q:

- C-x C-f /tmp/dir1/file

- C-x C-s
  Answer 'y' to the prompt to create the directory. At this point the
  buffer 'file' visits /tmp/dir1/file, and the file exists on the disk.

- Run dired in /tmp.

- Rename /tmp/dir1 into /tmp/dir2, e.g. using 'R'.

- Switch to the 'file' buffer. It still visits /tmp/dir1/file even
  though the file is now located in /tmp/dir2.

- Additional test: running C-x C-s in the 'file' buffer will ask again
  to create /tmp/dir1, which is normal since the directory has been
  renamed to /tmp/dir2.

Regards,

-- 
Nicolas Martyanoff
http://snowsyn.net
khaelin@gmail.com



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

* Re: Possible regression in dired when renaming directories
  2022-04-10 14:49   ` Nicolas Martyanoff
@ 2022-04-10 14:58     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2022-04-10 14:58 UTC (permalink / raw)
  To: Nicolas Martyanoff; +Cc: emacs-devel

> From: Nicolas Martyanoff <khaelin@gmail.com>
> Date: Sun, 10 Apr 2022 16:49:50 +0200
> Cc: Nicolas Martyanoff <khaelin@gmail.com>, emacs-devel@gnu.org
> 
> - C-x C-f /tmp/dir1/file
> 
> - C-x C-s
>   Answer 'y' to the prompt to create the directory. At this point the
>   buffer 'file' visits /tmp/dir1/file, and the file exists on the disk.
> 
> - Run dired in /tmp.
> 
> - Rename /tmp/dir1 into /tmp/dir2, e.g. using 'R'.
> 
> - Switch to the 'file' buffer. It still visits /tmp/dir1/file even
>   though the file is now located in /tmp/dir2.

Right, thanks.

Please report a bug using "M-x report-emacs-bug RET", with this
recipe.  I don't think this was intended, but I will investigate.



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

end of thread, other threads:[~2022-04-10 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-10 13:28 Possible regression in dired when renaming directories Nicolas Martyanoff
2022-04-10 14:00 ` Eli Zaretskii
2022-04-10 14:49   ` Nicolas Martyanoff
2022-04-10 14:58     ` Eli Zaretskii

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