From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#71345: Feature: unleash font-lock's secret weapon; handle Qfontified = non-nil Date: Wed, 5 Jun 2024 10:02:23 -0400 Message-ID: <64828D71-7A1D-4826-811A-A30E870358C7@gmail.com> References: <86msnzk4pl.fsf@gnu.org> Mime-Version: 1.0 (1.0) Content-Type: multipart/alternative; boundary=Apple-Mail-73ABB8D3-27E9-4237-8B5D-B17A0F535C2D Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18650"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71345@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 05 16:04:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sErFJ-0004gj-G4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jun 2024 16:04:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sErF0-0005X0-QV; Wed, 05 Jun 2024 10:03:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sErEz-0005WC-0f for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 10:03:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sErEy-00028L-OZ for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 10:03:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sErFB-0008Kh-Vj for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 10:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2024 14:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71345 X-GNU-PR-Package: emacs Original-Received: via spool by 71345-submit@debbugs.gnu.org id=B71345.171759623732015 (code B ref 71345); Wed, 05 Jun 2024 14:04:01 +0000 Original-Received: (at 71345) by debbugs.gnu.org; 5 Jun 2024 14:03:57 +0000 Original-Received: from localhost ([127.0.0.1]:37124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sErF7-0008KH-2B for submit@debbugs.gnu.org; Wed, 05 Jun 2024 10:03:57 -0400 Original-Received: from mail-qk1-f175.google.com ([209.85.222.175]:44220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sErF5-0008K2-KA for 71345@debbugs.gnu.org; Wed, 05 Jun 2024 10:03:56 -0400 Original-Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-79524f6693dso57863085a.0 for <71345@debbugs.gnu.org>; Wed, 05 Jun 2024 07:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717596156; x=1718200956; darn=debbugs.gnu.org; h=to:references:message-id:date:cc:in-reply-to:from:subject :mime-version:content-transfer-encoding:from:to:cc:subject:date :message-id:reply-to; bh=gLKh/AK0cCAlaDiiAYYgR2lg0fhgWW804UNF5+SKj6U=; b=CgW/1EoQA3bZwP1qPZpQhNBgKsqfAJtSKs9A0yg7IcfBS3MXORkj1XtIMwHwBWPV7n 40HItrCx5BKoCRw963netNpIkJhVH9+O1pdyyJK/joTLFS+qTL0i+kqwOsCB8Uht2uAt ImXDjubYwtB2T8/+wU7lsElEDeEHvbNDo6NeM5x2XScW5fHu0+kinqJJ6ouodpovaRS/ JnFdRX6TEN3O2RvkXPHCI1IRWczDi8KpDygiqWC7X0ts+3CLFZFT/UwpSMvIXUk0uEUH BaxpnkogiJ4hfdGWtIuGibyRjdl2+9B27hufcRYntEXun0CdGXmxiNxQSWCcDdDJYO0F cTZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717596156; x=1718200956; h=to:references:message-id:date:cc:in-reply-to:from:subject :mime-version:content-transfer-encoding:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=gLKh/AK0cCAlaDiiAYYgR2lg0fhgWW804UNF5+SKj6U=; b=cug31yH5iXl7be2Ofj0Skz/eYQ0pED141gByCv0JJVEC7Oe5zi5/eu5v0PZOvVj14+ oYBs8reKRRuviBtstasScKLDFY1ruBuHSCRvJs8uItirQHHJADHfnksmcqGBpSLaGYnW dQs4lW7dQJoQi7Qd93dWqygYVjqCLIztlTbQH9QI8b4gjrU0uSWl2FMRAVGoputqBWZE Zif8Dj4t0KEQUj3ooZPDkLzRfslu8xljSd+UNh1CokrqrnCPS3tP7owE8XF7LhdEpOkG Q7gYN/l17CVo6Mv/hJYa+kbkU/aMCt8Xzk50a3H6pUmX31gAwDqpHA32DLB9tAPJdj1C IzZw== X-Forwarded-Encrypted: i=1; AJvYcCWxiwx3aoFeeHCPOfhEM3NUPClMCDbhT8QL4Y47xG78k9RB5vr4FczkDj/BWuw8PiNY0GMTGs3Xy632IJbKvicFWTay5bU= X-Gm-Message-State: AOJu0YwMpXM/nam2InYahj/TecYGcSCc/SGebKwfvrP+seNZLpVc24cR XKb1BN05IzCSWj+PhUDONeyTaFozrm5GWzS7FMP20uKxJz2eRzmr X-Google-Smtp-Source: AGHT+IGNKnBywrb1r5PEuFbLgvLT3OUMyM/D4IYE6aa0ArSQoQ94etrn0xBY6b91OzxP9igJtUxd/g== X-Received: by 2002:ae9:e407:0:b0:795:1838:c028 with SMTP id af79cd13be357-79523d412aamr249249385a.8.1717596155764; Wed, 05 Jun 2024 07:02:35 -0700 (PDT) Original-Received: from smtpclient.apple ([198.30.180.100]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79520da3aa9sm88280985a.134.2024.06.05.07.02.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jun 2024 07:02:34 -0700 (PDT) In-Reply-To: <86msnzk4pl.fsf@gnu.org> X-Mailer: iPhone Mail (21F90) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286605 Archived-At: --Apple-Mail-73ABB8D3-27E9-4237-8B5D-B17A0F535C2D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> In general, yes. In my case having the scope be per-buffer not per windo= w makes the most sense in terms of >> the functionality. >=20 > Given the feature of redisplay I just mentioned, you will actually get > a per-window functionality, at least as far as the position of point > is concerned. Not in my case, since I am discriminating between point in the selected wind= ow and other windows showing the same buffer, such that switching windows =3D= changing point. Since much of the work in my mode is not position-dependent= but depends on text content, updating face is the natural thing. =20 Thinking more about what makes font-lock =E2=80=9Cspecial=E2=80=9D as a jit-= lock backend, it is exactly this: font-lock claims exclusive ownership of `f= ace'. Solutions I can see: Make font-lock a good citizen by using its own alias for face.=20 Give other jit-lock backends which may alter face and potentially conflict w= ith font-lock the ability to specify to jit-lock =E2=80=9Cif you re-run font= lock on a region, re-run me too after that.=E2=80=9D= --Apple-Mail-73ABB8D3-27E9-4237-8B5D-B17A0F535C2D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


In general, yes. &nbs= p;In my case having the scope be per-buffer not per window makes the most se= nse in terms of
the functionality.
=

Given the feature of redisplay I just mentioned, yo= u will actually get
a= per-window functionality, at least as far as the position of point
is concerned.

Not in my case, since I am discriminating between point in the s= elected window and other windows showing the same buffer, such that switchin= g windows =3D changing point. Since much of the work in my mode is not position-dependent but depends on text content, updating face is the natur= al thing.  

Thinking more about what makes font-lock =E2=80=9Csp= ecial=E2=80=9D as a jit-lock backend, it is exactly this: font-lock claims e= xclusive ownership of `face'.  Solutions I can see:
  1. Make font-lock a good citizen by using its own alias for face.&nb= sp;
  2. Give other jit-lock backends which may alter face and potentiall= y conflict with font-lock the ability to specify to jit-lock =E2=80=9Cif you= re-run font lock on a region, re-run me too after that.=E2=80=9D
<= /div>= --Apple-Mail-73ABB8D3-27E9-4237-8B5D-B17A0F535C2D--