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

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

bug#32000: 26.1; Behavior of buffer-offer-save not lining up with docume


From: Noam Postavsky
Subject: bug#32000: 26.1; Behavior of buffer-offer-save not lining up with documentation
Date: Thu, 28 Jun 2018 19:33:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Brad Lindsay <sluggy.fan@gmail.com> writes:

> I am trying to create a function that creates a new empty buffer that
> prompts you to save it when you kill it. Reading through the
> documentation, it looks like I need to set “buffer-offer-save” to a
> non-nil value since the new buffer is not a file-visiting buffer. I
> have tried doing that, and verifying that the variable isn’t set and
> that the new buffer isn’t empty, but when I close (kill) the buffer, I
> don’t get a prompt.

buffer-offer-save is for killing Emacs or save-some-buffers, to catch
buffer killing use kill-buffer-query-functions.  We could probably make
the docs a bit more explicit about this.

Or maybe we should enhance buffer-offer-save to cover the buffer killing
case too, it seems a bit silly to require setting both.





reply via email to

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