[Top][All Lists]

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

Re: Keep losing work in non-file-visiting buffers

From: sebyte
Subject: Re: Keep losing work in non-file-visiting buffers
Date: Thu, 04 Dec 2003 21:15:34 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1


Since *info* and *Help* buffers are never(?) marked as modified, I guess
it's actually save-buffers-kill-emacs (C-x C-c) that's holding you up, not
kill-buffer (C-x k). And that means it's buffer-offer-save that's at fault, not kill-buffer-query-functions.

So maybe you just want to turn on buffer-offer-save for buffers you explictly create, as with switch-to-buffer (C-x b), instead of buffers Emacs creates for you:

(defadvice switch-to-buffer (after buffer-offer-save activate)
  "Set `buffer-offer-save' when called interactively."
  (and (interactive-p)
       (setq buffer-offer-save t))) ; automatically local in all buffers

this time it really does work like a dream. Johan Bockgard's hack also works but offers no failed memory protection and is consequently not very helpful. i therefore extend my thanks just to you.


reply via email to

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