From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry OReilly Newsgroups: gmane.emacs.bugs Subject: bug#15045: Point jumps inappropriately around time of Semantic lexing Date: Tue, 15 Oct 2013 13:08:58 -0400 Message-ID: References: <87pptptk9n.fsf@engster.org> <87eha4t7xz.fsf@engster.org> <8738qksz6l.fsf@engster.org> <837gfvua2r.fsf@gnu.org> <87y58bs9x4.fsf@engster.org> <83zjsrs3k2.fsf@gnu.org> <87pptmsv4z.fsf@engster.org> <83siyira0w.fsf@gnu.org> <87vc3drhuv.fsf@engster.org> <83haexrgjn.fsf@gnu.org> <83ppr7pr6c.fsf@gnu.org> <83li1upkfx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff1c99ef827c904e8caa3f7 X-Trace: ger.gmane.org 1381857017 29050 80.91.229.3 (15 Oct 2013 17:10:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Oct 2013 17:10:17 +0000 (UTC) Cc: 15045@debbugs.gnu.org, David Engster , Eric Ludlam To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 15 19:10:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VW88R-0001Sh-Cd for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2013 19:10:19 +0200 Original-Received: from localhost ([::1]:43136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW88Q-00047O-K2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2013 13:10:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW88I-00046w-An for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2013 13:10:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VW88B-0007vh-1d for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2013 13:10:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VW88A-0007ud-VJ for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2013 13:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VW88A-00037L-5B for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2013 13:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Barry OReilly Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Oct 2013 17:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15045 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15045-submit@debbugs.gnu.org id=B15045.138185694711897 (code B ref 15045); Tue, 15 Oct 2013 17:10:02 +0000 Original-Received: (at 15045) by debbugs.gnu.org; 15 Oct 2013 17:09:07 +0000 Original-Received: from localhost ([127.0.0.1]:51731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VW87G-00035p-1r for submit@debbugs.gnu.org; Tue, 15 Oct 2013 13:09:06 -0400 Original-Received: from mail-oa0-f43.google.com ([209.85.219.43]:37733) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VW87E-00035J-HV for 15045@debbugs.gnu.org; Tue, 15 Oct 2013 13:09:05 -0400 Original-Received: by mail-oa0-f43.google.com with SMTP id i3so6039826oag.2 for <15045@debbugs.gnu.org>; Tue, 15 Oct 2013 10:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ebxHVepsZ9TS6GmvEdoMIOo4jyzV0KsoR82IrQ+CrhI=; b=GyYzgrv6lJlR7BqBrfvE3dJc9TRrXapf/w5OU+ch+cCewzfDRd8zagWuARAL7jQTdk O9IsUYPb6GOOwteMOFA+DsVlg9skUHUYo/5t/fbMpQblC4I/dVX1d7RdQPGBxUDoM6C9 jhiB5EkzxKVuBj7UpZISGV3cAgHDxFrwxvXaXMLybfmvq/j2lCQn/rP/P9EOtL3Ph4sJ q73PZZlMLWSleAzgDFNsLdFaB9uZbfZMXtpi7q84cvzKwa+PngKjgdjO6veAV0QyRzFP mOQbZOhZROcT0gU22so+hCnM1Ao4/qb0YOL1mOn1lGjz5GZjMkgsrGWxpu1gnyHXzeXE fdgg== X-Received: by 10.182.237.75 with SMTP id va11mr35981789obc.5.1381856938828; Tue, 15 Oct 2013 10:08:58 -0700 (PDT) Original-Received: by 10.76.156.103 with HTTP; Tue, 15 Oct 2013 10:08:58 -0700 (PDT) In-Reply-To: <83li1upkfx.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79279 Archived-At: --e89a8ff1c99ef827c904e8caa3f7 Content-Type: text/plain; charset=ISO-8859-1 I'm thinking I should augment the patch so as the observable behavior 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))) [...] I considered whether (<= seconds 0) could fall through to the t case instead. The read_char function has a complex implementation, so it's not clear doing so wouldn't change behavior. Is there another Lisp function that does timer_check and little else, which the (<= seconds 0) case could call? Should I write a new subr for it? Looking ahead to the concurrency branch, should (sit-for 0 t) and (thread-yield) have different behaviors? Or perhaps the former calls the latter? I don't see thread-yield checking for timers to run, should it? (And it didn't look like timers were split out into their own threads on the concurrency branch.) --e89a8ff1c99ef827c904e8caa3f7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm thinking I should augment the patch so as the obse= rvable behavior
of (sit-for 0) doesn't change. It would no longer ru= n timers if only
input-pending-p changes as described. Currently:
=A0 (defun sit-for (seconds &optional nodisp obsolete)
=A0=A0=A0 [..= .]
=A0=A0=A0 (cond
=A0=A0=A0=A0 [...]
=A0=A0=A0=A0 ((input-pending= -p)
=A0=A0=A0=A0=A0 nil)
=A0=A0=A0=A0 ((<=3D seconds 0)
=A0=A0= =A0=A0=A0 (or nodisp (redisplay)))
=A0=A0=A0=A0 [...]

I considere= d whether (<=3D seconds 0) could fall through to the t case
instead. The read_char function has a complex implementation, so it'snot clear doing so wouldn't change behavior.

Is there another = Lisp function that does timer_check and little else,
which the (<=3D = seconds 0) case could call? Should I write a new subr
for it?

Looking ahead to the concurrency branch, should (sit-for 0 t= ) and
(thread-yield) have different behaviors? Or perhaps the former cal= ls
the latter? I don't see thread-yield checking for timers to run,<= br> should it? (And it didn't look like timers were split out into theirown threads on the concurrency branch.)

--e89a8ff1c99ef827c904e8caa3f7--