unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David PONCE <da_vid@orange.fr>
To: 40788@debbugs.gnu.org
Subject: bug#40788: 28.0.50; Error running timer ‘custom-magic-reset’
Date: Thu, 23 Apr 2020 19:39:26 +0200 (CEST)	[thread overview]
Message-ID: <1699699799.16404.1587663566588.JavaMail.www@wwinf1p24> (raw)
In-Reply-To: <9360131a-d203-4075-78b2-f4d31d044801@orange.fr>

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







  reply	other threads:[~2020-04-23 17:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  5:10 bug#40788: 28.0.50; Error running timer ‘custom-magic-reset’ David Ponce
2020-04-23 17:39 ` David PONCE [this message]
2020-04-24 11:56   ` Robert Pluim
2020-04-24 15:56     ` David Ponce
2020-07-21  8:39       ` Robert Pluim
2020-07-21 14:20         ` Eli Zaretskii
2020-07-21 14:39           ` Robert Pluim

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=1699699799.16404.1587663566588.JavaMail.www@wwinf1p24 \
    --to=da_vid@orange.fr \
    --cc=40788@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).