From: Raffaele Ricciardi <rfflrccrd@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Alerts for saves to non-existent files
Date: Fri, 31 Aug 2012 15:19:33 +0100 [thread overview]
Message-ID: <aabvflFdnqU1@mid.individual.net> (raw)
In-Reply-To: <k1qb2h$emm$1@reader1.panix.com>
On 31/08/12 13:35, kj wrote:
> In <slrnk3sit9.dkp.joostkremers@j.kremers4.news.arnhem.chello.nl> Joost Kremers <joostkremers@yahoo.com> 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.
>
C-h v before-save-hook RET
next prev parent reply other threads:[~2012-08-31 14:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 12:21 Alerts for saves to non-existent files kj
2012-08-29 14:54 ` Peter Dyballa
2012-08-29 17:04 ` Joost Kremers
2012-08-31 12:35 ` kj
2012-08-31 14:19 ` Raffaele Ricciardi [this message]
2012-09-04 13:59 ` Joost Kremers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aabvflFdnqU1@mid.individual.net \
--to=rfflrccrd@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).