unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* dired: renaming file on disk + file in emacs buffer
@ 2004-08-20 15:12 Jari Aalto+mail.emacs
  0 siblings, 0 replies; 2+ messages in thread
From: Jari Aalto+mail.emacs @ 2004-08-20 15:12 UTC (permalink / raw)



I'm passing this to the discussion as what should be done in this 
situation:

    case 1

    C-x C-f ~/tmp/test.txt
    C-x d ~/tmp  => rename "R" test.txt to test2.txt

    => New filename is reflected in Emacs buffer visiting the file

But, if file is moved to another directory:

    case 2

    C-x C-f ~/tmp/test.txt
    C-x d ~/tmp  => rename "R" test.txt to ~/tmp/moved/test2.txt

    => New filename is NOT reflected in buffer vising the file

I would have expected that the file path location change would have been
chaned as in case 1. I could imagine that:

    a) the change in case 2 is identicval as in case 1, so change in 
       buffer-file-name is done transparently
    b) Dired includes a confirmation option that asks, if the current
       buffer visiting the file should reflect the new location.

That do you think?
Jari

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

* dired: renaming file on disk + file in emacs buffer
@ 2004-08-20 17:02 Luc Teirlinck
  0 siblings, 0 replies; 2+ messages in thread
From: Luc Teirlinck @ 2004-08-20 17:02 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Jari Aalto wrote:

    But, if file is moved to another directory:

	case 2

	C-x C-f ~/tmp/test.txt
	C-x d ~/tmp  => rename "R" test.txt to ~/tmp/moved/test2.txt

	=> New filename is NOT reflected in buffer vising the file

Which version of Emacs are you using?  In Emacs CVS, if I do this, the
buffer ends up named "test2.txt" and its default directory is now
~/tmp/moved, all as expected.

Sincerely,

Luc.

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

end of thread, other threads:[~2004-08-20 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-20 15:12 dired: renaming file on disk + file in emacs buffer Jari Aalto+mail.emacs
  -- strict thread matches above, loose matches on Subject: below --
2004-08-20 17:02 Luc Teirlinck

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