GNU bug report logs - #15045
Point jumps inappropriately around time of Semantic lexing

Previous Next

Package: emacs;

Reported by: Barry OReilly <gundaetiapo <at> gmail.com>

Date: Wed, 7 Aug 2013 18:00:02 UTC

Severity: normal

Done: Barry OReilly <gundaetiapo <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #185 received at 15045 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Barry OReilly <gundaetiapo <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 15045 <at> debbugs.gnu.org,
 David Engster <deng <at> randomsample.de>, Eric Ludlam <eric <at> siege-engine.com>
Subject: Re: bug#15045: Point jumps inappropriately around time of Semantic
 lexing
Date: Tue, 15 Oct 2013 22:57:29 -0400
> of (sit-for 0) doesn't change. It would no longer run timers if only
> input-pending-p changes as described. Currently:

>   (defun sit-for (seconds &optional nodisp obsolete)
>     [...]
>     (cond
>      [...]
>      ((input-pending-p)
>       nil)
>      ((<= seconds 0)
>       (or nodisp (redisplay)))
>      [...]

Indeed, the Elisp version of sit-for is a mess.

> I considered whether (<= seconds 0) could fall through to the t case
> instead.

The easiest solution is to add an optional argument `check-timers' to
input-pending-p, so you can preserve the exact same behavior.
In the long run, we should try and clean up sit-for, but you may not
have the courage to dig into this right now.

> Looking ahead to the concurrency branch, should (sit-for 0 t) and
> (thread-yield) have different behaviors?

Not really.

> I don't see thread-yield checking for timers to run, should it?

Yes, it should.

> (And it didn't look like timers were split out into their own threads
> on the concurrency branch.)

The current state of the concurrency branch is not always
representative of what it should ideally look like ;-)
But even if timers are made to belong to a thread, thread-yield should
probably check timers.


        Stefan




This bug report was last modified 11 years and 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.