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

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

Re: Saving Buffer


From: CarlC
Subject: Re: Saving Buffer
Date: Mon, 20 Jan 2003 19:33:39 GMT

"Phillip Lord" <p.lord@russet.org.uk> wrote in message
vfk7gzlln4.fsf@rpc71.cs.man.ac.uk">news:vfk7gzlln4.fsf@rpc71.cs.man.ac.uk...
> >>>>> "CarlC" == CarlC  <carlc@snowbd.com> writes:
>
>   CarlC> The function save-buffers-kill-emacs goes through each
>   CarlC> modified buffer with a file assocation and asks "Save file
>   CarlC> /home/carl/trash? (y, n, !, ., q, C-r or C-h)". Is this
>   CarlC> functionality available for a single (current) buffer? I
>   CarlC> cannot find a command similar to this. I just want to say
>   CarlC> kill-buffer, but ask to save if it is modified. I don't want
>   CarlC> it to kill-emacs.
>
>
> This should be the default behaviour. Certainly if I do kill-buffer,
> then I get "Buffer blah.txt modified: kill anyway?"

Not exactly what one would want. I guess you have to do save-buffer and then
kill-buffer. Ugh.

> This doesn't happen if the buffer is not associated with a file. So
> *scratch* can be killed in this way. If you want to stop this, you'll
> need to add a function to "kill-buffer-hook" to query the user first.

That's what I was afraid of. Seems a shame to have to reinvent the wheel.





reply via email to

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