From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: jit-lock-antiblink-grace Date: Sat, 30 Nov 2019 22:00:24 +0000 Message-ID: <87eexpt47b.fsf@gmail.com> References: <83k198ly94.fsf@gnu.org> <83sgnuh5cq.fsf@gnu.org> <87k17qozii.fsf@gmail.com> <83wobps0zy.fsf@gnu.org> <20191125184650.GA4496@ACM> <20191125192628.GC4496@ACM> <20191125201115.GD4496@ACM> <83d0deseo7.fsf@gnu.org> <87r21ptc02.fsf@gmail.com> <83y2vxmao3.fsf@gnu.org> <87mucdt96k.fsf@gmail.com> <83wobhm85n.fsf@gnu.org> <83v9r1m70u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="83397"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: acm@muc.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 30 23:10:46 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 1ibAwv-000L21-Q4 for ged-emacs-devel@m.gmane.org; Sat, 30 Nov 2019 23:10:45 +0100 Original-Received: from localhost ([::1]:38680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibAwo-0006wm-V6 for ged-emacs-devel@m.gmane.org; Sat, 30 Nov 2019 17:10:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40739) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibAwD-0006rz-E7 for emacs-devel@gnu.org; Sat, 30 Nov 2019 17:10:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibAwC-0007w7-2C for emacs-devel@gnu.org; Sat, 30 Nov 2019 17:10:01 -0500 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:44608) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ibAwB-0007uc-Ru; Sat, 30 Nov 2019 17:10:00 -0500 Original-Received: by mail-wr1-x42c.google.com with SMTP id q10so3113282wrm.11; Sat, 30 Nov 2019 14:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=tQK0GWfM7q2v8YDEWnQvdSuD5RPz+pdVReq/VajUxCo=; b=DkyL1tjJS3qeFw/y93420vbeVX/300vLq+otjrTVFNvKLwaeFIkySzfduOGKzZG9AE QB2arb/M9NLu7c8uiFI+TkHy8YxH8V845jGHjwyx9kG7wO5rmiYIVhGqRQ2qg7hZf37W WykVXrjaxzvXlYEwxngSxmxdmbzqYU6LXxa1tNYjrxv8EKRi0ZZEhSXeTeQcYp68OD66 TelUNkYQljd/ky6pRIxbFeIQoasF4/0m9sLAm2hJp6kr8NCwMsM4sSMZm/+Iihkf6DBl Y6encuL+gnh/a4el0n6UlmrV7nDamqH1qqRzTT5B9HJRwO14RcrphsDiglg1O0n5xfNd LJVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=tQK0GWfM7q2v8YDEWnQvdSuD5RPz+pdVReq/VajUxCo=; b=KKPISOVlVSF2Ho8njHC2dQ2RIVU0ymZvLA+3f4gZBJ3nKTZFtkmv/bMX60mihZaDWZ K7d6k2Vrvdgozkvs5NEgd4rW2iHLMLbzOn/Xgd8FjYJjFdLAj+TcDEHiIi9n0Yp6Bbnd l02KSMV0jJ4uY1w0izUpVSind4RZC9t/fO2iP1aVAdXrf9UwiGoSqCPKJGdWf6WfdSgZ 3kNzotKxbjzjDfhySQzi4ZyRgwqPAFe6UZ1Sm8MLUXZ+VaH80Tt1+jkWTsJfH0qYZSTJ geGmnpUjWndHBov4jZy5EZ6cdTMyENQiTLdGAYwC4sG7ti2hYKWJ/KJNdtJQS+/xBfcS oCyw== X-Gm-Message-State: APjAAAUAQdSLDE6UXvGkiO+T76+Wf2riLhfODsavsp7pj8iS4RlRAxKZ VIpW43x+yFP+b5FKzW3aLhM= X-Google-Smtp-Source: APXvYqxMgra88ECThGaXXW/CSypnBWGGHEKJCetblfwIpv031dnTywUxTLX9ZZfhHsGga5j5dHwLzg== X-Received: by 2002:adf:c611:: with SMTP id n17mr63292289wrg.317.1575151798729; Sat, 30 Nov 2019 14:09:58 -0800 (PST) Original-Received: from lolita.yourcompany.com ([2001:818:d820:9500:1ebb:afd8:ab26:f0f6]) by smtp.gmail.com with ESMTPSA id s25sm6192018wmh.4.2019.11.30.14.09.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2019 14:09:57 -0800 (PST) In-Reply-To: <83v9r1m70u.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 30 Nov 2019 22:41:21 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c 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:242927 Archived-At: Eli Zaretskii writes: >> From: Jo=C3=A3o T=C3=A1vora >> Date: Sat, 30 Nov 2019 20:19:35 +0000 >> Cc: Stefan Monnier , emacs-devel ,=20 >> Alan Mackenzie >>=20 >> > > > So how is this a problem, if at worst we get the old behavior? >> > > >> > > After b), you now have to wait 2 seconds (jit-lock-antiblink-grace) >> > > before you get the old behaviour (string-fontifying 7-10). >> > >> > Isn't this the new behavior? >>=20 >> Yes, but in this very particular case, it doesn't gain you anything, >> IMO. > > But you don't lose anything, either, right? Depends on how you look at it. Let me try to explain. jit-lock-antiblink-grace is based on presumptions, the main one being that when you open a string, no two seconds of idle time will elapse before you close it. The presumption is also that you will close it in a further position of the buffer. In the edge case I described, that doesn't hold: the user wants to close the string in a previous position. So I speculate that that user is accustomed to the old behaviour and will find it odd that the invalid fontification -- which he/she expects and potentially even likes and which used to come almost immediately -- now only comes after two seconds, or when moving up the line. This is fundamentally different from the main use case of jit-lock-antiblink, where we are certain that near-immediate invalid fontification will annoy the user, who we presume will "soon" close the string. So delaying that annoying thing is a good decision. I only mentioned this edge case (which doesn't affect me, personally) because previously I had written I could not find any useful behaviour lost by jit-lock-antiblink. I am doing this for completeness because we know changing any default is potentially controversial (cue https://xkcd.com/1172/). Jo=C3=A3o