From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: jit-lock-antiblink-grace Date: Sat, 12 Oct 2019 10:34:44 -0400 Message-ID: References: <834l0enw8c.fsf@gnu.org> <83y2xqm6m4.fsf@gnu.org> <83tv8em48z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="238661"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: joaotavora@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 12 16:35:25 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJIUP-000zzb-0K for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2019 16:35:25 +0200 Original-Received: from localhost ([::1]:33910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJIUN-0001vw-BL for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2019 10:35:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44056) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJITq-0001vj-QV for emacs-devel@gnu.org; Sat, 12 Oct 2019 10:34:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJITp-0002h7-9O for emacs-devel@gnu.org; Sat, 12 Oct 2019 10:34:50 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58359) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iJITn-0002ej-FY; Sat, 12 Oct 2019 10:34:47 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 98E47448E37; Sat, 12 Oct 2019 10:34:46 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4C9AA448E35; Sat, 12 Oct 2019 10:34:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1570890885; bh=C+8TbEl3BcK7dOcahroAdcBZRLPDPrnuPfAouUCHMkA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=A/q376ctkssKWzY0uZL6AMrWPyCCcjllOFFDKLGZEs7aHtbaoS8gc8vehn/NB64gw QFs3h7mJ9SOtVDDignK5p4eWJy691vXzqxZMCZ5l8h2sqOzfLOKfPKhFz+ZTNJLbhF A7GZX0leyc4y2QqrPlP/w5ewOkQw08xJZW5MpUV6zUHP77IMnQTpwwU7xdK0sYEV2x pvP5OmWuPYBH/pjFqcLOuubBwD62H3XDxWoB+l+JGkRpq/rKkaBUxe4dyL6/uqJ/hJ XK+Btn+pdgOQyAwBc4g9L1jtvrmJIHyAvNXUIL0zul3+cdWi1sWsYvCuCrWJ7g4eFW EiC0OycsodByg== Original-Received: from pastel (unknown [216.154.35.246]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 06E981205E8; Sat, 12 Oct 2019 10:34:45 -0400 (EDT) In-Reply-To: <83tv8em48z.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 12 Oct 2019 17:23:56 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240920 Archived-At: >> The only case where we don't is when we can't keep up with the input >> events in which case we skip redisplay, but that's the case where >> we're *already* too slow. > > My point is that post-command-hook might be called more often than > once per redisplay cycle, and I think we agree on that, right? Yes, but only if we can't keep up (i.e. if the event queue is already non-empty when we're done processing an event). So whether something is done in redisplay or in post-command-hook doesn't affect the repeat-rate threshold where we start skipping redisplay: it only affect how much speed we gain by skipping redisplay (i.e. how quickly we can recover). >> > It's a backward-incompatible behavior, and is not being developed due >> > to bug reports, >> It was developed because people like Alan are so bothered by the >> flashing that they're going through lengths to find other ways to >> avoid it. > I'm not saying this is not a useful feature, and I'm not objecting to > its inclusion. I'm asking why do we need to turn it on by default > right when we introduce it. Because I think it offers the behavior 99% of the users will want (modulo bugs). Everyone I ever talked to about this agreed that the current behavior is somewhat annoying and several of them mentioned using "strategies" to avoid it (e.g. use electric-pair-mode, or be sure to keep typing quickly so the string/comment gets closed before the jit-lock-context-timer fires, ...). >> > so why make it the default right from the start? It also slows down >> > cursor motion (which should probably be in the doc string as well). >> It shouldn't slow down cursor motion, normally (at least not in any >> measurable way). > Font lock does slow down Emacs, so calling it in more cases/places > will do so as well. AFAICT the code doesn't call font-lock. >> > I still don't think I understand what would constitute an >> > "unterminated string at EOL", then. Could you show two examples, one >> > where there is such a string, the other where there isn't? >> >> Code like: >> >> var x = "foo y = "bar"; >> >> where the user is in the middle of writing `x = "foobar";` but hasn't yet >> closed the string. > > Yes, and what is the other example I asked for, where we don't have an > unterminated string at EOL due to such editing? That would be "any normal line", as in: var x = "foobar"; y = "bar"; "unterminated string at EOL" means (nth 3 (syntax-ppss (line-end-position))) is non-nil. Stefan