From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Missing `with' macro? Date: Tue, 08 Aug 2006 14:01:50 -0400 Message-ID: References: <7dbe73ed0607240317g1bcdd564g66d075f809bcb7b2@mail.gmail.com> <33776.128.165.123.18.1154052850.squirrel@webmail.lanl.gov> <21839.128.165.0.81.1154394370.squirrel@webmail.lanl.gov> <48104.128.165.123.18.1154986690.squirrel@webmail.lanl.gov> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1155060184 13196 80.91.229.2 (8 Aug 2006 18:03:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Aug 2006 18:03:04 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 08 20:02:58 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GAVu1-0003QU-Pv for ged-emacs-devel@m.gmane.org; Tue, 08 Aug 2006 20:02:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAVu1-00027D-57 for ged-emacs-devel@m.gmane.org; Tue, 08 Aug 2006 14:02:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GAVto-00025d-4Z for emacs-devel@gnu.org; Tue, 08 Aug 2006 14:01:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GAVtn-00025C-LW for emacs-devel@gnu.org; Tue, 08 Aug 2006 14:01:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAVtn-00024z-IL for emacs-devel@gnu.org; Tue, 08 Aug 2006 14:01:51 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GAVyJ-0004bt-2r for emacs-devel@gnu.org; Tue, 08 Aug 2006 14:06:31 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GAVtm-00062e-Hh; Tue, 08 Aug 2006 14:01:50 -0400 Original-To: herring@lanl.gov In-reply-to: <48104.128.165.123.18.1154986690.squirrel@webmail.lanl.gov> (herring@lanl.gov) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58180 Archived-At: > To use the user's existing buffer would save the user's own unsaved > changes without asking. That is completely unacceptable. Is it completely unacceptable even if the file in question is principally "owned" by code anyway? Yes, I think so. If it is unlikely that users will edit the file by hand, that means there is unlikely to be a buffer to reuse. But IF there is a buffer to reuse, it means the user edited the file by hand. When he does so, you should not save his changes without his ok! I see other possibilities: 1. (and REUSE WRITE (buffer-modified-p #) (error "Attempt to co-opt user's unsaved changes")) - that is, only allow REUSE and WRITE on an unmodified buffer. It is better to go ahead not reusing the buffer than to signal an error. 2. Go on modifying (because of WRITE) the buffer (because of REUSE), but don't save the changes at the end, or else ask the user whether to save them. That would be very inconvenient. There is no need to implement that option, and it would be better to avoid it for simplicity's sake. Either of these could be combined with a query beforehand: Any query will be an inconvenience. That's another reason now to implement these options. Complexity is a drawback, not a feature. I am looking for ways to simplify this. We should not reject them because of maybes.