From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.devel Subject: Re: undoing changes automatically Date: Wed, 9 Jan 2008 10:10:17 +0100 Message-ID: <18308.36729.829191.788405@tfkp07.physik.uni-erlangen.de> References: <18231.43165.842097.720674@tfkp07.physik.uni-erlangen.de> <853avbp6ie.fsf@lola.goethe.zz> <18232.50129.24712.310255@tfkp07.physik.uni-erlangen.de> <18308.10385.319747.688235@tfkp07.physik.uni-erlangen.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199869836 6534 80.91.229.12 (9 Jan 2008 09:10:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Jan 2008 09:10:36 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 09 10:10:56 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 1JCWxb-0000KB-GY for ged-emacs-devel@m.gmane.org; Wed, 09 Jan 2008 10:10:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCWxE-00010H-5l for ged-emacs-devel@m.gmane.org; Wed, 09 Jan 2008 04:10:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCWx9-0000x7-PD for emacs-devel@gnu.org; Wed, 09 Jan 2008 04:10:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCWx6-0000pk-Uu for emacs-devel@gnu.org; Wed, 09 Jan 2008 04:10:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCWx6-0000pS-RZ for emacs-devel@gnu.org; Wed, 09 Jan 2008 04:10:24 -0500 Original-Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JCWx3-0000Nt-4K; Wed, 09 Jan 2008 04:10:21 -0500 Original-Received: from tfkp07.physik.uni-erlangen.de (tfkp07.physik.uni-erlangen.de [131.188.164.207]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 516A22153C; Wed, 9 Jan 2008 10:10:19 +0100 (CET) In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.1.2 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:86628 Archived-At: On Wed Jan 9 2008 Stefan Monnier wrote: > > I looked at the code of cancel-change-group. It's not clear to me > > what "Undoing to some unrelated state" means. I'd expect that > > atomic-change-group should not produce any errors by itself. > > I guess the message means that cancel-change-group couldn't find the > path (through undo entries) going from the current state to the > original state. More specifically, it means that the current undo-log > does not contains as one of its nthcdr the head of the original > undo logs. That might be the case if the changes to undo are too > numerous and the undo-log has been truncated to the point where the > undo-info needed to revert the change are not present any more. I thought of something like this, though I couldn't phrase it as nicely and accurately as you did it :-) Inside atomic-change-group, bibtex-format-entry does its job for one BibTeX entry at a time. So typically it operates on 10 to 15 lines of plain text (~ 300 characters), and it adds about 100 elements to the undo list. I'd expect that these are still sufficiently small numbers for atomic-change-group. I checked in the new code of bibtex.el that uses atomic-change-group. So we'll see if anybody else runs into similar problems when using bibtex-mode. Roland