I just saw a very strange undo problem. I have no simple way to reproduce it, but I can frame it a bit. Lock at the backtrace below:

 Debugger entered--Lisp error: (wrong-type-argument
         number-or-marker-p  nil)
  rng-error-modified(#<overlay in no buffer> t 777 777 85)
  primitive-undo(2 (nil (777 . 862) (t 17963 . 2531)))
  undo-more(2)
  undo()
  call-interactively(undo)

Doesn't it look strange that rng-error-modified (from the nxml-mode package) is the first thing on the backtrace, before primitive-undo?



The problem is very reproduceable for me, it happens every time I call undo in a certain situation.

I can give more detail instructions on how to reproduce this problem if someone is interested. It is not complicated to do that, but quite many things are involved.


Maybe a bit of the problem is the look of the backtrace? rng-error-modified is part of the rng validation package that comes with nxml-mode. The validation is running with idle timers. It uses a defmacro similar to save-buffer-state in font-lock.el when it modifies the faces in the buffer. It does that during validation and validation is triggered by changes in the buffer. I am sure that a lot of validation takes place right after the undo.

I can not see how it can interfere with undo however. Or at least I can not see how it can do that if the Emacs timers all run within the lisp w32 thread of Emacs on w32. (If however w32 timers are used the situation is very, very different. I think I asked about if such timers were used long ago, but I can't remember I got any clear answer to that.)

A problem is that I do not know what to do with this. The "undo information" in the buffer seems corrupt after the above traceback.



In GNU Emacs 22.0.98.1 (i386-mingw-nt5.1.2600)
 of 2007-04-22 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  nxhtml-global-validation-header-mode: t
  appmenu-mode: t
  emacsw32-mode: t
  mlinks-mode: t
  indent-region-mode: t
  swbuff-y-mode: t
  which-function-mode: t
  show-paren-mode: t
  recentf-mode: t
  cua-mode: t
  encoded-kbd-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<f5> <return> <f10> <menu-bar> <options> <debug-on-error>
M-x m u m a m o - m o d e <return> j j j j j j j j
j j j j j j A <lwindow> M-x n x m l - c o m p l e t
e <return> <escape> u C-a C-c <timeout> C-x 5 2 <f12>
h <f12> <right> <right> <left> <left> <f10> <menu-bar>
<help-menu> <report-emacs-bug>

Recent messages:
Loading sgml-mode...done
Loading c:/emacs/u/070422/emacsw32/nxml/nxhtml/php-mode.el (source)...done
`<' that is not markup must be entered as `&lt;'
Loading c:/emacs/u/070422/emacsw32/nxml/nxhtml/javascript.el (source)...done
undo!
Loading debug...done
Entering debugger...
Mark set [2 times]
Type C-x 1 to remove help window.
Loading emacsbug...done


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to