From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.bugs Subject: bug#15045: Point jumps inappropriately around time of Semantic lexing Date: Thu, 08 Aug 2013 22:30:26 +0200 Message-ID: <8738qksz6l.fsf@engster.org> References: <87pptptk9n.fsf@engster.org> <87eha4t7xz.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375994066 11971 80.91.229.3 (8 Aug 2013 20:34:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Aug 2013 20:34:26 +0000 (UTC) Cc: 15045@debbugs.gnu.org, "Eric M. Ludlam" To: Barry OReilly Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 08 22:34:28 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 1V7Wug-0001aM-Oy for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Aug 2013 22:34:26 +0200 Original-Received: from localhost ([::1]:39984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7Wug-0007h0-DX for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Aug 2013 16:34:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7WuY-0007fi-Lf for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 16:34:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7WrO-0003Ht-Fj for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 16:31:26 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7WrO-0003Hj-BI for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 16:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V7WrN-0000oF-UF for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 16:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Engster Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Aug 2013 20:31:01 +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.13759938373055 (code B ref 15045); Thu, 08 Aug 2013 20:31:01 +0000 Original-Received: (at 15045) by debbugs.gnu.org; 8 Aug 2013 20:30:37 +0000 Original-Received: from localhost ([127.0.0.1]:47907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7Wqy-0000nA-21 for submit@debbugs.gnu.org; Thu, 08 Aug 2013 16:30:36 -0400 Original-Received: from randomsample.de ([83.169.19.17]:47849) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7Wqu-0000my-IB for 15045@debbugs.gnu.org; Thu, 08 Aug 2013 16:30:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=jY8UU4oZGjEMgoD+ymmWOL4aCJO0DweMlzALnfYOX3w=; b=aeCrmHvuBySaCkF9Hq1zloyt8GvbDZGY8jlGGBRWKrCYt92VvR+jOmXwwqMw0dT8yWma0tXqJXG+IU9w5JN2jMeITDz4YLFy5UTsXekIINbgsVfbFraT/2T/1Tx1SUTs; Original-Received: from dslc-082-083-054-159.pools.arcor-ip.net ([82.83.54.159] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1V7Wqp-0008HI-Mw; Thu, 08 Aug 2013 22:30:27 +0200 In-Reply-To: (Barry OReilly's message of "Thu, 8 Aug 2013 16:03:30 -0400") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) 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:77103 Archived-At: Barry OReilly writes: >> timer-event-handler([t 20995 27860 0 60 display-time-event-handler nil nil 0]) >> accept-process-output() >> semantic-c-lexer(2886 7946 nil nil) > > and > >> timer-event-handler([t 20995 36800 0 60 display-time-event-handler nil nil 0]) >> input-pending-p() >> semantic-c-lexer(2939 7944 nil nil) > > This is indeed a key finding. > > If arbitrary timers can execute during the lexer's call to > accept-process-output or input-pending-p, then doesn't that mean > jit-lock-deferred-fontify can run too? Under certain circumstances I guess it could, but usually, deferred jit-lock will happen after a keypress, and that would already make the Semantic idle function quit. > If removing timers' sit-for calls is the solution, then what's to > become of jit-lock-deferred-fontify's call to sit-for? That is not the solution, at least not in general. As I've written, I think the correct fix is for Semantic to make sure we restore point before calling `semantic-throw-on-input'. Or maybe we should do this in `semantic-exit-on-input'; I'm not sure. However, doing redisplay in timers is not nice. If it is not necessary, like maybe in the time-display handler, then it should be removed. > Doesn't deferred jit locking necessarily have to call redisplay? I would think so, too. -David