GNU bug report logs -
#40788
28.0.50; Error running timer ‘custom-magic-reset’
Previous Next
Reported by: David Ponce <da_vid <at> orange.fr>
Date: Thu, 23 Apr 2020 05:13:02 UTC
Severity: normal
Merged with 41245
Found in versions 27.0.91, 28.0.50
Fixed in version 27.1
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 40788 <at> debbugs.gnu.org (full text, mbox):
Hello again,
Below is a possible patch that seems to have fixed the issue for me.
But I am not sure the approach is correct
Thanks!
diff --git a/installs/emacs/lisp/cus-edit.el b/emacs.d/cus-edit.el
index d3d17fd..eec7ef0 100644
--- a/installs/emacs/lisp/cus-edit.el
+++ b/emacs.d/cus-edit.el
@@ -2217,9 +2217,16 @@ and `face'."
;; commands like `M-u' (that work on a region in the buffer)
;; will upcase the wrong part of the buffer, since more text has
;; been inserted before point.
- (run-with-idle-timer 0.0 nil #'custom-magic-reset widget)
+ (run-with-idle-timer 0.0 nil #'custom-magic-reset-async (current-buffer) widget)
(apply 'widget-default-notify widget args))))
+(defun custom-magic-reset-async (buffer widget)
+ "Redraw the :custom-magic property of WIDGET.
+Called asynchronously thru an idle timer, ensure redrawing will happen in the
+origin custom BUFFER."
+ (set-buffer buffer)
+ (custom-magic-reset widget))
+
(defun custom-redraw (widget)
"Redraw WIDGET with current settings."
(let ((line (count-lines (point-min) (point)))
This bug report was last modified 4 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.