From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: A new(?) warning of erase-buffer, which was not seen before. Date: Fri, 23 Mar 2007 20:31:37 +0900 Organization: NEC Electronics Message-ID: References: <45FDF35F.6030605@ubin.jp> <45FF5975.1070602@ubin.jp> <4602639A.8030606@ubin.jp> <87vegsj244.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1174649560 7017 80.91.229.12 (23 Mar 2007 11:32:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2007 11:32:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 23 12:32:34 2007 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 1HUi09-0007S8-0B for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 12:32:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUi22-0007pO-E9 for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 06:34:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUi1z-0007mm-3c for emacs-devel@gnu.org; Fri, 23 Mar 2007 07:34:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUi1w-0007iy-P1 for emacs-devel@gnu.org; Fri, 23 Mar 2007 07:34:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUi1w-0007iS-II for emacs-devel@gnu.org; Fri, 23 Mar 2007 06:34:00 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HUi02-0004Sc-CW for emacs-devel@gnu.org; Fri, 23 Mar 2007 07:32:02 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HUhzs-0006Wf-63 for emacs-devel@gnu.org; Fri, 23 Mar 2007 12:31:52 +0100 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 Mar 2007 12:31:52 +0100 Original-Received: from miles.bader by fencepost.gnu.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 Mar 2007 12:31:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: fencepost.gnu.org System-Type: i686-pc-linux-gnu Blat: Foop Cancel-Lock: sha1:ZDkicBLYZIq2llfOpEiDWOxjJbU= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:68378 Archived-At: bojohan+news@dd.chalmers.se (Johan Bockgård) writes: >> I've been working on some patches to comint to do this, by selectively >> disabling undo at various points, but it's not entirely straight-forward >> because you then have to fix up the undo list to account for the >> unrecorded buffer changes. > > FWIW, erc.el does this kind of selective undo. How does it deal with changing buffer locations? I mean, if you're editing a new command line at the same time that some text is being output into the buffer by the subprocess, then if you don't record the subprocess output in the undo list (and you don't want to), then the buffer positions recorded in buffer-undo-list become invalid, as they're simply integers (not markers). My attempted solution was to scan through buffer-undo-list, updating those position, every time I inserted some "hidden from undo" text. [This isn't typically a performance problem because _usually_ buffer-undo-list is nil when process output is occuring.] Thanks, -Miles -- [|nurgle|] ddt- demonic? so quake will have an evil kinda setting? one that will make every christian in the world foamm at the mouth? [iddt] nurg, that's the goal