From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Alerts for saves to non-existent files Date: 4 Sep 2012 13:59:48 GMT Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1346767222 23598 80.91.229.3 (4 Sep 2012 14:00:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2012 14:00:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 04 16:00:20 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8tfu-0007kU-7j for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Sep 2012 16:00:18 +0200 Original-Received: from localhost ([::1]:54106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8tfr-0006dw-BF for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Sep 2012 10:00:15 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-X-Trace: individual.net sjmeDjjkiWlzMBw83bId9gLzHU6+vxYL1GfOQr3OMCi51e8/fYyiUx7meJ35seYHQF Cancel-Lock: sha1:6cWGr5feQdH91agtdJ2RCh8ugCE= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/pre1.0.0-18 (Linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:194305 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86648 Archived-At: kj wrote: > In Joost Kremers writes: > >>kj wrote: >>> 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)? > >>you can use C-x C-w to save a buffer to another file. that doesn't delete >>the original file, but using C-x C-w and then deleting the original file >>should cause less vexation than your current scenario. ;-) > > > No, that doesn't address the problem I tried (but clearly failed) > to describe. I want to prevent cases in which I *inadvertently* > do C-x C-s, forgetting/not realizing that the current value of > buffer-file-name is a non-existent path. Sorry, you did describe it well, I didn't explain very well what I meant. What I suggested was to change your habit of renaming files from within the shell to renaming them with C-x C-w in Emacs. But the before-save-hook that Raffaele mentioned is definitely better... -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)