GNU bug report logs -
#60467
30.0.50; primitive-undo: Changes to be undone by function different from announced
Previous Next
Reported by: Ihor Radchenko <yantar92 <at> posteo.net>
Date: Sun, 1 Jan 2023 13:40:01 UTC
Severity: normal
Found in version 30.0.50
Done: Gregory Heytings <gregory <at> heytings.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> <undo element 1> <timestamp> <undo element 2> <timestamp> nil <undo element 3>
>
> ofter body has been evaluated, the buffer-undo-list after
> combine-change-call is
>
> (apply ... #'undo--wrap-and-run-primitive-undo ... (<undo element 1>))
> <timestamp> <undo element 2> <timestamp> nil <undo element 3>
>
> which is clearly wrong
Indeed. Which begs the question: why does the current code stop when it
sees a timestamp?
Alan? Do you remember why you did that?
What would go wrong if we applied a patch like the one below?
Stefan
diff --git a/lisp/subr.el b/lisp/subr.el
index 5fb150994ec..6f51ac90ce5 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4972,10 +4972,11 @@ combine-change-calls-1
;; In case garbage collection has removed OLD-BUL.
(cdr ptr)
;; Don't include a timestamp entry.
- (not (and (consp (cdr ptr))
- (consp (cadr ptr))
- (eq (caadr ptr) t)
- (setq old-bul (cdr ptr)))))
+ ;; (not (and (consp (cdr ptr))
+ ;; (consp (cadr ptr))
+ ;; (eq (caadr ptr) t)
+ ;; (setq old-bul (cdr ptr))))
+ )
(setq ptr (cdr ptr)))
(unless (cdr ptr)
(message "combine-change-calls: buffer-undo-list broken"))
This bug report was last modified 1 year and 333 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.