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: 4 minor suggestions for files.el Date: Fri, 18 Apr 2003 07:28:59 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200304142022.h3EKMHRu026814@rum.cs.yale.edu> <200304172139.h3HLdBvK009948@rum.cs.yale.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1050665783 563 80.91.224.249 (18 Apr 2003 11:36:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 18 Apr 2003 11:36:23 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 18 13:36:21 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 196UAH-00008x-00 for ; Fri, 18 Apr 2003 13:36:21 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 196UDZ-0002kz-00 for ; Fri, 18 Apr 2003 13:39:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 196U57-0004rr-04 for emacs-devel@quimby.gnus.org; Fri, 18 Apr 2003 07:31:01 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 196U3g-0004jf-00 for emacs-devel@gnu.org; Fri, 18 Apr 2003 07:29:32 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 196U3K-0004Vu-00 for emacs-devel@gnu.org; Fri, 18 Apr 2003 07:29:10 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 196U3A-0004Ra-00 for emacs-devel@gnu.org; Fri, 18 Apr 2003 07:29:00 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 196U39-0006a4-00; Fri, 18 Apr 2003 07:28:59 -0400 Original-To: "Stefan Monnier" In-reply-to: <200304172139.h3HLdBvK009948@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) Original-cc: spiegel@gnu.org Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13280 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13280 Huh? It works just dandy here. The undo-log is correct (and has the necessary entries corresponding to the insert-file operation). The only real issue is not correctness but performance: the undo-log might contain a very large string (if the insert-file operation had to modify a large part of the buffer). I think I understand now--it treats the insert-file operation as an ordinary undoable buffer change. Spiegel, is that really the right thing to do in VC? I also worry about the large strings. Maybe there should be a file size threshold on this change. I was wondering if it would be worth it to try and make insert-file even more clever: pass the `before' and `after' to diff and then apply the diff by hand. This will preserve even more of the markers (and would make the undo-log smaller and more useful, in the case that revert-buffer doesn't flush it). That is a very interesting idea. Perhaps diff could have an output format designed to give the best possible results with Emacs, and for the highest efficiency.