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

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

Re: Bug? buffer-offer-save


From: Juanma Barranquero
Subject: Re: Bug? buffer-offer-save
Date: Wed, 24 Sep 2008 16:31:48 +0200

On Wed, Sep 24, 2008 at 15:33, Xah Lee <xah@xahlee.org> wrote:
> To test this which seems like a bug to me, do this:

> then call it. You'll have a new buffer. Now type something in it. Now,
> go to the menu "File‣Close".
>
> You'll see that emacs closes the buffer immediately without offering
> save.

The docstring for buffer-offer-save says:

  Non-nil in a buffer means always offer to save buffer on exit.
  Do so even if the buffer is not visiting a file.

But File / Close is not exiting, is killing a buffer. That's not
different of just creating a new buffer, typing something on it and
then doing C-x k <ENTER>.

buffer-offer-save is not intended to protect a buffer against killing.
You can use `kill-buffer-query-functions' for that (or some available
packages, like Noah S. Friedman's protbuf.el).

   Juanma

reply via email to

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