From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: kj Newsgroups: gmane.emacs.help Subject: Re: Alerts for saves to non-existent files Date: Fri, 31 Aug 2012 12:35:29 +0000 (UTC) Organization: none Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1346416814 1775 80.91.229.3 (31 Aug 2012 12:40:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Aug 2012 12:40:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 31 14:40:15 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 1T7QWE-0003su-UI for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Aug 2012 14:40:15 +0200 Original-Received: from localhost ([::1]:50739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7QWC-0001DZ-Dq for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Aug 2012 08:40:12 -0400 Original-Path: usenet.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: panix3.panix.com Original-X-Trace: reader1.panix.com 1346416529 15062 166.84.1.3 (31 Aug 2012 12:35:29 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Fri, 31 Aug 2012 12:35:29 +0000 (UTC) X-No-Confirm: yes User-Agent: nn/6.7.3 Original-Xref: usenet.stanford.edu gnu.emacs.help:194261 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:86606 Archived-At: 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. In fact, I'd be completely satisfied if in such situations Emacs handled C-x C-s in basically the same way it does for buffers (e.g. *scratch* or *shell*) whose buffer-file-name is nil, namely by prompting the user for a "File to save in: ...". The only difference between these two cases would be that in the former one, the proposed path following the prompt would be the (non-existent) path currently in buffer-file-name, while in the latter it is only directory prefix, to which the user must add a basename.