GNU bug report logs -
#40140
26.3; Renaming a directory with an external tool
Previous Next
Reported by: Nicolas Gimenez <n.gimenez66 <at> gmail.com>
Date: Fri, 20 Mar 2020 00:56:02 UTC
Severity: wishlist
Found in version 26.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 40140 <at> debbugs.gnu.org (full text, mbox):
Hello Nicolas
Nicolas Gimenez <n.gimenez66 <at> gmail.com> writes:
> Hi!
>
>
> Right after renaming a directory with an external tool when Emacs is
> visiting a file in that directory, Emacs doesn't change the open file
> buffers directory association.
>
> It would probably be better to open a prompt where one can navigate to a
> new target directory.
>
>
> Steps to reproduce:
>
> 1) Create file and directory
> '/home/nicolas/elixir_learn/mastery/test/support/tmp/test.ex' within
> Spacemacs.
>
> 2) Edit file, still from Spacemacs add dummy info. Save file.
>
> 3) Save file
> '/home/nicolas/elixir_learn/mastery/test/support/tmp/test.ex from Spacemacs
>
> 4) Switch to bash in an external terminal and run: "mv
> /home/nicolas/elixir_learn/mastery/test/support/tmp
> /home/nicolas/elixir_learn/mastery/test/support/tmp2". (Emacs still open
> in another OS's frame.)
>
> 5) Get back to Emacs. Attempt to write file from Emacs, minibuffer in
> the bottom shows: "Please answer y or n. Directory
> '/home/nicolas/elixir_learn/mastery/test/support/tmp/' does not exist;
> create? (y or n)"
If you try this experiment with any other text editor I think you will
see similar effects. I tried with gedit and vim and got the
corresponding effects.
Using Emacs in this case I would do C-x C-w and then navigate to the
existing directory, then one with the new name tmp2. Then I will have to
allow over-writing the copy of test.ex on disc in tmp2.
I think the text editor cannot assume that the buffer holding test.ex is
to be associated with the file in the new directory. The buffer-file
association is broken by the external renaming of the directory.
Best regards
--
Tomas
This bug report was last modified 4 years and 61 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.