From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [jidanni@deadspam.com: modeline doesn't divulge buffer will go bye bye] Date: Fri, 28 Jun 2002 11:41:12 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200206281741.g5SHfCO04348@santafe.santafe.edu> References: <200206201435.g5KEZLF18772@aztec.santafe.edu> <5xu1nxh6o7.fsf@kfs2.cua.dk> <200206221720.g5MHKLj16237@rum.cs.yale.edu> <877kkrw1pz.fsf@emacswiki.org> <200206231812.g5NICiS24452@aztec.santafe.edu> <87r8ixazu9.fsf@emacswiki.org> <200206241940.g5OJe8v26290@aztec.santafe.edu> <87u1nse5qr.fsf@emacswiki.org> <87bsa09x5r.fsf@tc-1-100.kawasaki.gol.ne.jp> <87d6uge3q5.fsf@emacswiki.org> <87znxk8erv.fsf@tc-1-100.kawasaki.gol.ne.jp> <871yav79bh.fsf@pot.cnuce.cnr.it> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1025286166 6346 127.0.0.1 (28 Jun 2002 17:42:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 28 Jun 2002 17:42:46 +0000 (UTC) Cc: pot@gnu.org, alex@emacswiki.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Nzld-0001eF-00 for ; Fri, 28 Jun 2002 19:42:45 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17Nzop-0004Pi-00 for ; Fri, 28 Jun 2002 19:46:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17Nzlq-00089p-00; Fri, 28 Jun 2002 13:42:58 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17Nzk9-0007qR-00; Fri, 28 Jun 2002 13:41:13 -0400 Original-Received: from santafe.santafe.edu (santafe [192.12.12.2]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g5SHfCB09035; Fri, 28 Jun 2002 11:41:12 -0600 (MDT) Original-Received: (from rms@localhost) by santafe.santafe.edu (8.10.2+Sun/8.9.3) id g5SHfCO04348; Fri, 28 Jun 2002 11:41:12 -0600 (MDT) X-Authentication-Warning: santafe.santafe.edu: rms set sender to rms@santafe using -f Original-To: miles@gnu.org In-Reply-To: (message from Miles Bader on 27 Jun 2002 11:33:35 +0900) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5250 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5250 So how about a variable like `ask-about-saving-user-scratch-buffers', with `nil' meaning `never' (the current behavior), `ask' meaning ask the above question and if so treat them like unsaved file-buffers, and any other non-nil value meaning always treat them like unsaved file-buffers. That sounds good. That's similar to setting `buffer-offer-save' to t by default and forcing modes that create temporary, discardable buffers to explicitly set it to nil, isn't it? It is similar, but I think it is good to have a separate option to control this, and it is better for that option to take effect when you exit rather than when you create the buffer. So there needs to be a way to distinguish these buffers from other buffers. Perhaps a value `maybe' for `buffer-offer-save' would be the way to do it. When `buffer-offer-save' has that value, during saving before exit, `offer-saving-scratch-buffers' would be obeyed. As for the easy way to set up that value for `buffer-offer-save', perhaps `switch-to-buffer' could do this whenever it creates a buffer. That way, all the Lisp programs that create buffers would not be affected.