From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: TODO Date: Wed, 27 Feb 2008 15:45:01 -0500 Message-ID: References: <5E2DA7EF-D0F1-4B0C-A3DC-F0B64FE2FE00@gmail.com> <13170DB6-B7A1-4843-AAF5-AB68B65D2331@gmail.com> <18370.18434.78349.822958@kahikatea.snap.net.nz> <200802261813.m1QIDEku015891@sallyv1.ics.uci.edu> <200802261848.m1QImEag004425@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204145127 8599 80.91.229.12 (27 Feb 2008 20:45:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2008 20:45:27 +0000 (UTC) Cc: mail.vjrao@gmail.com, Dan Nicolaescu , nickrob@snap.net.nz, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 21:45:52 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUT9s-0003AI-UZ for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2008 21:45:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUT9M-0002IN-Ow for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2008 15:45:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUT9J-0002I8-FF for emacs-devel@gnu.org; Wed, 27 Feb 2008 15:45:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUT9H-0002Hp-4d for emacs-devel@gnu.org; Wed, 27 Feb 2008 15:45:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUT9G-0002Hm-Uh for emacs-devel@gnu.org; Wed, 27 Feb 2008 15:45:06 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUT9C-0001a5-So; Wed, 27 Feb 2008 15:45:03 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAJtaxUdMCpz5Wmdsb2JhbACQXgEgnTmBAg X-IronPort-AV: E=Sophos;i="4.25,415,1199682000"; d="scan'208";a="15307219" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 27 Feb 2008 15:45:02 -0500 Original-Received: from pastel.home ([76.10.156.249]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id HWU30802; Wed, 27 Feb 2008 15:45:02 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id DD3727F25; Wed, 27 Feb 2008 15:45:01 -0500 (EST) In-Reply-To: (Richard Stallman's message of "Wed, 27 Feb 2008 11:07:09 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:90651 Archived-At: > If the problem is the undo-list, then we can change insert-file-contents > to not clear the buffer-undo-list in the case where it did make any > changes to the buffer. I've installed a change that does just that. > I think this should not be the normal case for insert-file-contents, > when VISIT = nil. Rather, it should be a special option to be used in > particular cases like this. Perhaps visit = vc? If `insert-file-contents' does not change any part of the buffer, it's basically a no-op. I see hence no reason for it to flush the undo-list in that case. AFAIK, flushing the undo list is done on the expectation that the new content is substantially different, so the original undo-list is only valid if we add a big undo-entry that represents the changes made by insert-file-contents (hence making the insert-file-contents operation undoable). In the case where the new content is equal to the old content, we may as well keep the undo-list. Stefan