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: Wed, 09 Aug 2006 00:58:18 -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> <49220.128.165.123.18.1155061950.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 1155099528 22549 80.91.229.2 (9 Aug 2006 04:58:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 9 Aug 2006 04:58:48 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 09 06:58:44 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 1GAg9P-0007p0-1n for ged-emacs-devel@m.gmane.org; Wed, 09 Aug 2006 06:58:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAg9O-0006Ay-9L for ged-emacs-devel@m.gmane.org; Wed, 09 Aug 2006 00:58:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GAg96-000677-DS for emacs-devel@gnu.org; Wed, 09 Aug 2006 00:58:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GAg95-00065j-SL for emacs-devel@gnu.org; Wed, 09 Aug 2006 00:58:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAg95-00065O-Is for emacs-devel@gnu.org; Wed, 09 Aug 2006 00:58:19 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GAgDh-0003Ip-AG for emacs-devel@gnu.org; Wed, 09 Aug 2006 01:03:05 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GAg94-0003Tg-F5; Wed, 09 Aug 2006 00:58:18 -0400 Original-To: herring@lanl.gov In-reply-to: <49220.128.165.123.18.1155061950.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:58200 Archived-At: > 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! It means the user -visited- the file explicitly. He may or may not have been interested in changing it by hand. I don't know, however, if this distinction is important. If he didn't decide to change it by hand, then either (1) the buffer is unmodified, or (2) he changed it unwittingly. Aha -- perhaps there's a good "compromise" here. What if REUSE is treated as nil if the extant buffer is modified and WRITE is non-nil? It would work, but getting rid of the REUSE argument is much better because it makes this macro simpler to use. Should I add a note that the user's buffer can become outdated as a result of failed or unattempted reuse of it? No need. There are lots of ways a file could be changed on disk while it is visited in an Emacs buffer; there is no particular reason to distinguish this way from all the rest.