* bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect
@ 2013-05-30 13:18 E Sabof
2013-05-30 14:05 ` Kevin Rodgers
2013-05-30 14:43 ` E Sabof
0 siblings, 2 replies; 9+ messages in thread
From: E Sabof @ 2013-05-30 13:18 UTC (permalink / raw)
To: 14512
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
Steps to reproduce:
- emacs -Q
- C-x b test RET
- M-: (setq buffer-offer-save t)
- write some text
- C-x k RET
The buffer is gone, but no prompt is shown.
Evgeni
[-- Attachment #2: Type: text/html, Size: 284 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect
2013-05-30 13:18 bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect E Sabof
@ 2013-05-30 14:05 ` Kevin Rodgers
2013-05-30 14:43 ` E Sabof
1 sibling, 0 replies; 9+ messages in thread
From: Kevin Rodgers @ 2013-05-30 14:05 UTC (permalink / raw)
To: 14512
On 5/30/13 7:18 AM, E Sabof wrote:
> Steps to reproduce:
> - emacs -Q
> - C-x b test RET
> - M-: (setq buffer-offer-save t)
> - write some text
> - C-x k RET
>
> The buffer is gone, but no prompt is shown.
As documented: buffer-offer-save is consulted "on exit" i.e. by
`save-buffers-kill-emacs' and `save-some-buffers'.
The Elisp manual should be updated to also mention `save-buffers-kill-terminal',
since most users exit Emacs via `C-x C-c'.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect
2013-05-30 13:18 bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect E Sabof
2013-05-30 14:05 ` Kevin Rodgers
@ 2013-05-30 14:43 ` E Sabof
2013-05-30 18:10 ` Michael Heerdegen
1 sibling, 1 reply; 9+ messages in thread
From: E Sabof @ 2013-05-30 14:43 UTC (permalink / raw)
To: kevin.d.rodgers, 14512
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
> As documented: buffer-offer-save is consulted "on exit" i.e. by
> `save-buffers-kill-emacs' and `save-some-buffers'.
> The Elisp manual should be updated to also mention
`save-buffers-kill-terminal',
> since most users exit Emacs via `C-x C-c'.
In that case, might it be better to extend the behavior to kill-buffer? I
see little benefit in this third type of behavior. Plus there is no easy
way to protect a buffer from accidental killing.
Evgeni
[-- Attachment #2: Type: text/html, Size: 620 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect
2013-05-30 14:43 ` E Sabof
@ 2013-05-30 18:10 ` Michael Heerdegen
2013-05-30 18:41 ` E Sabof
0 siblings, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2013-05-30 18:10 UTC (permalink / raw)
To: E Sabof; +Cc: kevin.d.rodgers, 14512
E Sabof <esabof@gmail.com> writes:
> Plus there is no easy way to protect a buffer from accidental
> killing.
There is a built-in package for exactly that: emacs-lock.el.
Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect
2013-05-30 18:10 ` Michael Heerdegen
@ 2013-05-30 18:41 ` E Sabof
2013-05-30 23:09 ` Glenn Morris
0 siblings, 1 reply; 9+ messages in thread
From: E Sabof @ 2013-05-30 18:41 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: Kevin Rodgers, 14512
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
It's not exactly the same. There is no connection between locked and saved
states.
Evgeni
On Thu, May 30, 2013 at 7:10 PM, Michael Heerdegen <michael_heerdegen@web.de
> wrote:
> E Sabof <esabof@gmail.com> writes:
>
> > Plus there is no easy way to protect a buffer from accidental
> > killing.
>
> There is a built-in package for exactly that: emacs-lock.el.
>
> Michael.
>
[-- Attachment #2: Type: text/html, Size: 863 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect
2013-05-30 18:41 ` E Sabof
@ 2013-05-30 23:09 ` Glenn Morris
2013-05-30 23:12 ` Glenn Morris
2013-05-31 0:17 ` E Sabof
0 siblings, 2 replies; 9+ messages in thread
From: Glenn Morris @ 2013-05-30 23:09 UTC (permalink / raw)
To: E Sabof; +Cc: 14512
If you want Emacs to
1) offer to save a buffer on exit
2) offer to save a buffer on C-x k
then why not simply make that buffer visit a file?
Because you also probably want
3) some kind of auto-save in case your computer dies while you are
editing the buffer
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect
2013-05-30 23:09 ` Glenn Morris
@ 2013-05-30 23:12 ` Glenn Morris
2013-05-31 0:17 ` E Sabof
1 sibling, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2013-05-30 23:12 UTC (permalink / raw)
To: E Sabof; +Cc: 14512
Though having said that, personally I advise kill-buffer to prompt for
confirmation if buffer-offer-save is non-nil.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect
2013-05-30 23:09 ` Glenn Morris
2013-05-30 23:12 ` Glenn Morris
@ 2013-05-31 0:17 ` E Sabof
2022-02-05 23:41 ` bug#14512: buffer-offer-save does not affect kill-buffer Lars Ingebrigtsen
1 sibling, 1 reply; 9+ messages in thread
From: E Sabof @ 2013-05-31 0:17 UTC (permalink / raw)
To: Glenn Morris; +Cc: 14512
[-- Attachment #1: Type: text/plain, Size: 1005 bytes --]
I no longer use it much, since I create/kill temporary buffers quite often.
But this is the default behavior in most programs, and I suspect many
people would want to change it. My 1 year ago self included.
On second thought, there might be a case for prompting for save only on
emacs exit, but I think it would be more natural if there was a separate
switch to do that, and it was responsible for all
(and (buffer-modified-p)
(or (buffer-file-name)
buffer-offer-save))
buffers.
On a related note, I get the impression that the prompt being hard coded is
a remnant from times when kill-buffer-query-functions didn't exist.
Evgeni
On Fri, May 31, 2013 at 12:09 AM, Glenn Morris <rgm@gnu.org> wrote:
>
> If you want Emacs to
>
> 1) offer to save a buffer on exit
> 2) offer to save a buffer on C-x k
>
> then why not simply make that buffer visit a file?
>
> Because you also probably want
>
> 3) some kind of auto-save in case your computer dies while you are
> editing the buffer
>
[-- Attachment #2: Type: text/html, Size: 1512 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#14512: buffer-offer-save does not affect kill-buffer
2013-05-31 0:17 ` E Sabof
@ 2022-02-05 23:41 ` Lars Ingebrigtsen
0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-05 23:41 UTC (permalink / raw)
To: E Sabof; +Cc: Glenn Morris, 14512
E Sabof <esabof@gmail.com> writes:
> > On Fri, May 31, 2013 at 12:09 AM, Glenn Morris <rgm@gnu.org> wrote:
> >
> > If you want Emacs to
> >
> > 1) offer to save a buffer on exit
> > 2) offer to save a buffer on C-x k
> >
> > then why not simply make that buffer visit a file?
> I no longer use it much, since I create/kill temporary buffers quite
> often. But this is the default behavior in most programs, and I
> suspect many people would want to change it. My 1 year ago self
> included.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
In other programs, all "buffers" are tied to files, so Emacs behaves
quite like them in this regard.
In any case, I think everything here is working as designed, so I'm
therefore closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-02-05 23:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 13:18 bug#14512: 24,3; buffer-offer-save doesn't seem to have any effect E Sabof
2013-05-30 14:05 ` Kevin Rodgers
2013-05-30 14:43 ` E Sabof
2013-05-30 18:10 ` Michael Heerdegen
2013-05-30 18:41 ` E Sabof
2013-05-30 23:09 ` Glenn Morris
2013-05-30 23:12 ` Glenn Morris
2013-05-31 0:17 ` E Sabof
2022-02-05 23:41 ` bug#14512: buffer-offer-save does not affect kill-buffer Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).