From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: A new(?) warning of erase-buffer, which was not seen before. Date: Fri, 23 Mar 2007 18:35:14 +0100 Message-ID: <46040FD2.70300@gmx.at> References: <45FDF35F.6030605@ubin.jp> <45FF5975.1070602@ubin.jp> <4602639A.8030606@ubin.jp> <87vegsj244.fsf@catnip.gol.com> <460407F6.2070708@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1174671261 14825 80.91.229.12 (23 Mar 2007 17:34:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2007 17:34:21 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: "Lennart Borgman (gmail)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 23 18:34:04 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 1HUneL-0000DJ-Ip for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 18:34:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUngG-0002By-N7 for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 12:36:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUngD-00022T-HJ for emacs-devel@gnu.org; Fri, 23 Mar 2007 13:35:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUngB-0001qG-Pn for emacs-devel@gnu.org; Fri, 23 Mar 2007 13:35:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUngB-0001pZ-Lx for emacs-devel@gnu.org; Fri, 23 Mar 2007 12:35:55 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HUneF-000518-HM for emacs-devel@gnu.org; Fri, 23 Mar 2007 13:33:55 -0400 Original-Received: (qmail invoked by alias); 23 Mar 2007 17:33:54 -0000 Original-Received: from N913P013.adsl.highway.telekom.at (EHLO [62.47.58.13]) [62.47.58.13] by mail.gmx.net (mp031) with SMTP; 23 Mar 2007 18:33:54 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/AeQRQyZbAtX5HCYATPzMdesbQBXCqh6ygqVdFx4 1WP0k8W1YYGDbt User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <460407F6.2070708@gmail.com> X-Y-GMX-Trusted: 0 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:68421 Archived-At: >>>> 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. > > > Yes, please. And also an delete-without-undo. You can't do that by simply scanning the buffer-undo-list and comparing positions. If I recall correctly `erc-update-undo-list' doesn't even handle the simple case where the undo list records an insertion from A to B, and you want to insert a text from C to D where A < C and D < B. It would either modify both A and B or none of them.