unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 13999@debbugs.gnu.org, Carsten Bormann <cabo@tzi.org>
Subject: bug#13999: 24.3.50; rng-validate-while-idle -> (error "Selecting deleted buffer")
Date: Fri, 22 Mar 2013 22:39:29 +0800	[thread overview]
Message-ID: <m1boabpkgu.fsf@gmail.com> (raw)
In-Reply-To: <jwv1ub7v9ns.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 22 Mar 2013 09:36:36 -0400")

On 2013-03-22 21:36 +0800, Stefan Monnier wrote:
>> The code in rng-valid.el uses the following idiom to redisplay without
>> triggering idle timers.
>
> Why does it need to do that?
>
>
>         Stefan

Does the following make any sense?

(defun rng-validate-while-idle-continue-p ()
  ;; input-pending-p and sit-for run timers that are
  ;; ripe.  Binding timer-idle-list to nil prevents
  ;; this.  If we don't do this, then any ripe timers
  ;; will get run, and we won't get any chance to
  ;; validate until Emacs becomes idle again or until
  ;; the other lower priority timers finish (which
  ;; can take a very long time in the case of
  ;; jit-lock).
  (let ((timer-idle-list nil))
    (and (not (input-pending-p))
	 ;; Fake rng-validate-up-to-date-end so that the mode line
	 ;; shows progress.  Also use this to save point.
	 (let ((rng-validate-up-to-date-end (point)))
	   (goto-char rng-validate-display-point)
	   (when (not rng-validate-display-modified-p)
	     (restore-buffer-modified-p nil))
	   (force-mode-line-update)
	   (let ((continue (sit-for 0)))
	     (goto-char rng-validate-up-to-date-end)
	     continue)))))





  reply	other threads:[~2013-03-22 14:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 15:35 bug#13999: 24.3.50; rng-validate-while-idle -> (error "Selecting deleted buffer") Carsten Bormann
2013-03-19 15:55 ` Leo Liu
2013-03-19 20:51 ` Stefan Monnier
2013-03-20  0:33   ` Leo Liu
2013-03-20  3:29     ` Stefan Monnier
2013-03-20  4:30       ` Leo Liu
2013-03-22  9:55         ` Leo Liu
2013-03-22 13:36           ` Stefan Monnier
2013-03-22 14:39             ` Leo Liu [this message]
2013-03-22 17:34               ` Stefan Monnier
2013-03-23  1:47                 ` Leo Liu
2013-03-23  7:54                   ` Carsten Bormann
2013-03-23 14:13                     ` Leo Liu
2013-03-23  3:28       ` Leo Liu
2013-03-23 16:10         ` Stefan Monnier
2013-03-24  6:51           ` Leo Liu

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=m1boabpkgu.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=13999@debbugs.gnu.org \
    --cc=cabo@tzi.org \
    --cc=monnier@iro.umontreal.ca \
    /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).