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: A new(?) warning of erase-buffer, which was not seen before. Date: Fri, 23 Mar 2007 12:54:57 -0400 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=us-ascii X-Trace: sea.gmane.org 1174668921 32645 80.91.229.12 (23 Mar 2007 16:55:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2007 16:55:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 23 17:55:10 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 1HUn2j-0007im-Uz for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 17:55:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUn4e-0001iZ-To for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 11:57:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUn4Z-0001gv-6v for emacs-devel@gnu.org; Fri, 23 Mar 2007 12:57:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUn4U-0001gQ-Fm for emacs-devel@gnu.org; Fri, 23 Mar 2007 12:57:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUn4U-0001gN-CN for emacs-devel@gnu.org; Fri, 23 Mar 2007 11:56:58 -0500 Original-Received: from tomts16.bellnexxia.net ([209.226.175.4] helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUn2Y-0003oq-K3 for emacs-devel@gnu.org; Fri, 23 Mar 2007 12:54:58 -0400 Original-Received: from pastel.home ([70.55.83.113]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070323165457.SLAE1673.tomts16-srv.bellnexxia.net@pastel.home> for ; Fri, 23 Mar 2007 12:54:57 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 6AC877F49; Fri, 23 Mar 2007 12:54:57 -0400 (EDT) In-Reply-To: ("Johan =?iso-8859-1?Q?Bockg=E5rd=22's?= message of "Fri\, 23 Mar 2007 13\:56\:34 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-detected-kernel: Solaris 8 (1) 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:68416 Archived-At: >>>> 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? > Nicely. >> 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.] > That's exactly what ERC does. See erc-update-undo-list. I.e. we should probably add a "insert-without-undo" function which does just that. Stefan