help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alerts for saves to non-existent files


From: kj
Subject: Alerts for saves to non-existent files
Date: Wed, 29 Aug 2012 12:21:12 +0000 (UTC)
User-agent: nn/6.7.3



It often happens that I move or rename the file "underlying" some
buffer in an ongoing Emacs session and (for various reasons) fail
to make the appropriate change in Emacs, with the result that I
end up inadvertently saving changes to the old location.  This
often leads to unnecessary puzzlement (e.g. changes to an input
file fail to have the expected effects, etc.).

Therefore, I'm looking for a way to have Emacs notice when an
attempt is made to save to a file that no longer exists.  (Of
course, this scenario has to be distinguished somehow from the one
in which the intent is to *create* a file by saving a buffer for
the first time, but maybe it is enough to somehow associate a "first
save" flag with the buffer.)

Is there a way to tell Emacs that, from now on, it should save all
changes to this buffer to the new path (and preferably without
asking for any additional confirmation)?

(As itches go, this one is mild indeed, but it also has a very long
standing, and for this reason alone it has caused, cumulatively
over 3+ decades, a huge amount of vexation.)

Thanks!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]