From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.bugs Subject: bug#42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el Date: Mon, 20 Jul 2020 08:59:31 +0200 Message-ID: <20200720065931.GA5179@odonien.localdomain> References: <20200630130822.GE451135@odonien.localdomain> <83d05gzf7z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AqsLC8rIMeq19msA" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7403"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42138@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 20 09:00:11 2020 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 1jxPmV-0001p6-58 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Jul 2020 09:00:11 +0200 Original-Received: from localhost ([::1]:49692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jxPmU-0004XD-68 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Jul 2020 03:00:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jxPmN-0004X3-6z for bug-gnu-emacs@gnu.org; Mon, 20 Jul 2020 03:00:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50320) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jxPmM-0007Kk-TY for bug-gnu-emacs@gnu.org; Mon, 20 Jul 2020 03:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jxPmM-0007iO-QG for bug-gnu-emacs@gnu.org; Mon, 20 Jul 2020 03:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 07:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42138 X-GNU-PR-Package: emacs Original-Received: via spool by 42138-submit@debbugs.gnu.org id=B42138.159522838729600 (code B ref 42138); Mon, 20 Jul 2020 07:00:02 +0000 Original-Received: (at 42138) by debbugs.gnu.org; 20 Jul 2020 06:59:47 +0000 Original-Received: from localhost ([127.0.0.1]:33633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxPm6-0007hM-MC for submit@debbugs.gnu.org; Mon, 20 Jul 2020 02:59:46 -0400 Original-Received: from mout-p-101.mailbox.org ([80.241.56.151]:37964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxPm2-0007h2-0r for 42138@debbugs.gnu.org; Mon, 20 Jul 2020 02:59:44 -0400 Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4B9CJl3yMXzKmjW; Mon, 20 Jul 2020 08:59:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id elzDnkk-cCMj; Mon, 20 Jul 2020 08:59:32 +0200 (CEST) Content-Disposition: inline In-Reply-To: <83d05gzf7z.fsf@gnu.org> X-MBO-SPAM-Probability: 0 X-Rspamd-Score: -5.45 / 15.00 / 15.00 X-Rspamd-Queue-Id: 77044175A X-Rspamd-UID: 47487c 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" Xref: news.gmane.io gmane.emacs.bugs:183282 Archived-At: --AqsLC8rIMeq19msA Content-Type: text/plain; charset=utf-8 Content-Disposition: inline > I think enriched-mode, like any other mode that puts its own faces on > chunks of text by means other than font-lock, is fundamentally > incompatible with font-lock. It's basically the same problem as if > you tried to use put-text-property in *scratch* to put some face > property on some text in the buffer: the face won't show until you > turn off font-lock. That's because the first thing font-lock does is > wipe out all the faces in the buffer. Thanks for the clarification. This doesn't really help me though, I want to adjust my existing font-lock using code so that it detects when it would wipe out said text properties enriched-mode set up. It doesn't appear to be sufficient to just check whether `font-lock-mode` is non-nil, if I do that inside the example enriched.txt file, it's set to `t` for some reason. Again, what would the correct check be here? > Any way that uses put-text-property, add-text-properties, etc. without > using font-lock will do. You can even try that manually via the > facemenu-set-* commands (or via the Edit->Text Properties menu from > the menu bar). Hm, I've done that for non-font-lock scenarios before, but in this case I really need font-lock's ability to search for strings and apply fontification to them, so this isn't really an option. Looking for other examples in the Emacs sources I've found uses of `jit-lock-register`. --AqsLC8rIMeq19msA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAl8VQMoACgkQFmfJg6zC ifoKRAf9GdVUzgacbYJ95MtKuXIaE4s45QjRfVPAd5RFXNjXQpmfBxkuRzwIr1Ms fKEz10BYEOMLeFZUg0TC3Jsp6cEOP2nTpWdiRyuGMqrXupSe5rx3MP5HmKNreJoj w4e99VTq20KU1yimh3BPQ8t1KpHxFwVvHDlEWT7jR0Kkes3kb8d1vEy/fwJMMJiO BiELd+BLo28HVgwIhW+YVhRawCdQ1gv6NcfLmbDnrdwpldyqjYUTWEe1QwY84tWK uDZiDx3hPSi0LD+WNbIHq1qJNcsjPuaD198keSSKuF+VgqjMEODN+3L3aOexvPQG uctcm6JUhSX4bXKxLiAD+IeHgM38qA== =JDe8 -----END PGP SIGNATURE----- --AqsLC8rIMeq19msA--