From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#10047: Looking for help debugging an undo issue Date: Mon, 14 Nov 2011 23:52:35 +1300 Message-ID: <4EC0F2F3.5000607@orcon.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1321291899 22889 80.91.229.12 (14 Nov 2011 17:31:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Nov 2011 17:31:39 +0000 (UTC) To: 10047@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 14 18:31:33 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RQ0NZ-0002A2-8G for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Nov 2011 18:31:33 +0100 Original-Received: from localhost ([::1]:41535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQ0NY-0004kq-Kb for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Nov 2011 12:31:32 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQ0NV-0004kC-Mp for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 12:31:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQ0NU-0000Jd-3E for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 12:31:29 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQ0NU-0000JX-05 for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 12:31:28 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RQ0O2-0007WN-Bc for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 12:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Nov 2011 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132129189228863 (code B ref -1); Mon, 14 Nov 2011 17:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Nov 2011 17:31:32 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQ0NX-0007VT-Nc for submit@debbugs.gnu.org; Mon, 14 Nov 2011 12:31:32 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPuAT-0005sY-4G for submit@debbugs.gnu.org; Mon, 14 Nov 2011 05:53:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPu9q-0005Rp-Es for submit@debbugs.gnu.org; Mon, 14 Nov 2011 05:52:59 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:55262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPu9q-0005Rl-Bv for submit@debbugs.gnu.org; Mon, 14 Nov 2011 05:52:58 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:41887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPu9p-0002jW-C1 for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 05:52:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPu9n-0005RS-I3 for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 05:52:57 -0500 Original-Received: from mx7.orcon.net.nz ([219.88.242.57]:36881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPu9m-0005QQ-Vo for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 05:52:55 -0500 Original-Received: from Debian-exim by mx7.orcon.net.nz with local (Exim 4.69) (envelope-from ) id 1RPu9Y-0005Fc-V9 for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 23:52:41 +1300 Original-Received: from [60.234.157.21] (helo=[192.168.1.2]) by mx7.orcon.net.nz with esmtpa (Exim 4.69) (envelope-from ) id 1RPu9Y-0005Er-AS for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2011 23:52:40 +1300 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 X-DSPAM-Check: by mx7.orcon.net.nz on Mon, 14 Nov 2011 23:52:40 +1300 X-DSPAM-Result: Innocent X-DSPAM-Processed: Mon Nov 14 23:52:40 2011 X-DSPAM-Confidence: 0.5539 X-DSPAM-Probability: 0.0000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 14 Nov 2011 12:31:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 14 Nov 2011 12:32:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53903 Archived-At: Hi all, I'm a bit stumped, and am not even sure how to approach this. I'm writing a major mode for entering timesheet data for use with a custom application, and I wanted to keep the columns automatically aligned within a block of entries for a given day, so my mode uses `post-command-hook' to (most of the time) call `align-current', which works more or less as I want* except that I'm encountering situations in testing where the undo system forgets some of the history and just reports "No further undo information". This is happening when I delete a few lines of data, and then try to re-do it all. It gets part way through and then fails to re-do the remainder. This is something of a show-stopper. I'm seeing the same issue with both Emacs 23.3 and 24.0.91.1 on both Windows and Ubuntu. I'm really not sure how to go about debugging the problem. I was hoping that maybe someone can provide some insight into how my use of align-current and post-command-hook might affect the undo system, or otherwise suggest some smart ways of narrowing down what the problem is? I'm really not familiar with the inner workings of the mechanisms in question. All I can think of offhand is that (despite the test data being only ~200 bytes) I'm managing to exceed the maximum amount of undo data permitted, and it's silently losing the data for the older changes?? I've verified that the issue occurs when running emacs with the -Q option, and loading only the relevant files, although I haven't yet boiled the code down to a minimal test case. I imagine that's the next step, if no one has any immediate suggestions, but unfortunately the bug seems inconsistent in when it occurs, so I've been having some trouble even trying to do that much. thanks, -Phil (*) I'm finding it trickier than I had hoped to configure the align rules for this purpose, but that's not relevant here other than to say that the docstring for the `align-rules-list' variable should detail the requirement for and use of the (end reverse) arguments for a custom "regexp" function, because that's not obvious without searching for example usages and/or reading through the somewhat complex code in the align library. (The problem I'm having occurs regardless of whether I'm using a custom function or a plain regexp, however.)