all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 10047@debbugs.gnu.org
Subject: bug#10047: Looking for help debugging an undo issue
Date: Fri, 18 Nov 2011 12:36:23 -0500	[thread overview]
Message-ID: <jwvd3cp2v8h.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4EC0F2F3.5000607@orcon.net.nz> (Phil Sainty's message of "Mon, 14 Nov 2011 23:52:35 +1300")

> 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??

Your problem doesn't ring a bell, sorry.  The best options I can think
of are:
- log the value of buffer-undo-list at each step in some auxiliary
  debugging buffer, for post-mortem analysis.
- try to come up with a reproducible test case.
  

        Stefan





  reply	other threads:[~2011-11-18 17:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 10:52 bug#10047: Looking for help debugging an undo issue Phil Sainty
2011-11-18 17:36 ` Stefan Monnier [this message]
2011-11-28 10:49   ` Phil Sainty
2011-11-29 20:22     ` Stefan Monnier
2011-12-01 14:16       ` Phil Sainty
2011-12-01 16:16         ` Stefan Monnier
2012-08-09  7:35       ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvd3cp2v8h.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=10047@debbugs.gnu.org \
    --cc=psainty@orcon.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.