From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15045: Point jumps inappropriately around time of Semantic lexing Date: Fri, 09 Aug 2013 10:53:33 +0300 Message-ID: <83zjsrs3k2.fsf@gnu.org> References: <87pptptk9n.fsf@engster.org> <87eha4t7xz.fsf@engster.org> <8738qksz6l.fsf@engster.org> <837gfvua2r.fsf@gnu.org> <87y58bs9x4.fsf@engster.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1376034859 11734 80.91.229.3 (9 Aug 2013 07:54:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Aug 2013 07:54:19 +0000 (UTC) Cc: gundaetiapo@gmail.com, 15045@debbugs.gnu.org, eric@siege-engine.com To: David Engster Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 09 09:54: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 1V7hWc-000824-Ns for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Aug 2013 09:54:18 +0200 Original-Received: from localhost ([::1]:40349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7hWc-0006w7-5I for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Aug 2013 03:54:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7hWT-0006vn-Sf for bug-gnu-emacs@gnu.org; Fri, 09 Aug 2013 03:54:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7hWN-00063A-Ne for bug-gnu-emacs@gnu.org; Fri, 09 Aug 2013 03:54:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7hWN-00062m-K6 for bug-gnu-emacs@gnu.org; Fri, 09 Aug 2013 03:54:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V7hWM-0007Wd-2k for bug-gnu-emacs@gnu.org; Fri, 09 Aug 2013 03:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Aug 2013 07:54: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.137603481028866 (code B ref 15045); Fri, 09 Aug 2013 07:54:02 +0000 Original-Received: (at 15045) by debbugs.gnu.org; 9 Aug 2013 07:53:30 +0000 Original-Received: from localhost ([127.0.0.1]:48824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7hVo-0007VP-VV for submit@debbugs.gnu.org; Fri, 09 Aug 2013 03:53:29 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:45701) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7hVk-0007V1-LE for 15045@debbugs.gnu.org; Fri, 09 Aug 2013 03:53:26 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MR90090077YX400@a-mtaout22.012.net.il> for 15045@debbugs.gnu.org; Fri, 09 Aug 2013 10:53:18 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MR9009F778TMJ90@a-mtaout22.012.net.il>; Fri, 09 Aug 2013 10:53:17 +0300 (IDT) In-reply-to: <87y58bs9x4.fsf@engster.org> X-012-Sender: halo1@inter.net.il 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:77127 Archived-At: > From: David Engster > Cc: gundaetiapo@gmail.com, monnier@iro.umontreal.ca, 15045@debbugs.gnu.org, eric@siege-engine.com > Date: Fri, 09 Aug 2013 07:36:07 +0200 > > >> However, doing redisplay in timers is not nice. > > > > Why not? > > Because doing redisplay is a user-visible side effect, and in general, > timers shouldn't have those. How else can a timer such as that of display-time do its thing? IOW, when the purpose of a timer is to cause something to be displayed, they have no alternative but to force redisplay. > AFAICS, any function that calls things like > `accept-process-output', `input-pending-p' or `sit-for' inside a > `save-excursion' might get an unwanted scrolling effect if point is > temporarily moved to some invisible location. You mean, because of timers that might get run and cause redisplay? Yes, that's possible. But the way to avoid this is to never call these when point is in a place the user won't expect. Forcing the Emacs community not to trigger redisplay inside timers is IMO _not_ the right way, because this is unnecessarily restrictive, and would disallow a whole bunch of useful features for no good reason. IOW, it's the caller of input-pending-p etc. that is the fault here, not the timers that it inadvertently lets run. > In fact, I just understood another bug in speck-mode (which is similar > to flycheck). I sometimes had unwanted scrolls there, too, and I now saw > that those also happen at every full minute while typing. Then there's the same bug there, that's all. Doing things in the background is hard in Emacs, so it's a small wonder some modes get it wrong. > >> > Doesn't deferred jit locking necessarily have to call redisplay? > >> > >> I would think so, too. > > > > But since jit-lock-deferred-fontify only happens when Emacs is idle, > > there's no problem with that, since Emacs enters redisplay also when > > it is idle. > > I thought that the jit-lock timer is a non-idle timer, but you are > right. There's no jit-lock timer. There are timers for jit-lock-stealth and for jit-lock-deferred-fontify (both optional features), and they are all idle timers. JIT Lock itself is not triggered by any timer, it is invoked by redisplay when a portion of text that is not fontified yet comes into view.