From unknown Sun Jun 22 08:08:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jun 2020 13:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 42138@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15935225133363 (code B ref -1); Tue, 30 Jun 2020 13:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jun 2020 13:08:33 +0000 Received: from localhost ([127.0.0.1]:50437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqG00-0000sA-Nu for submit@debbugs.gnu.org; Tue, 30 Jun 2020 09:08:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:58114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqFzy-0000s1-Kf for submit@debbugs.gnu.org; Tue, 30 Jun 2020 09:08:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqFzy-0005DO-Ea for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 09:08:30 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:38274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1jqFzw-0001l0-8A for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 09:08:30 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (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 49x4RZ4Sc8zKmtM for ; Tue, 30 Jun 2020 15:08:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id C2f37n8Cji16 for ; Tue, 30 Jun 2020 15:08:23 +0200 (CEST) Date: Tue, 30 Jun 2020 15:08:22 +0200 From: Vasilij Schneidermann Message-ID: <20200630130822.GE451135@odonien.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B8ONY/mu/bqBak9m" Content-Disposition: inline X-MBO-SPAM-Probability: 0 X-Rspamd-Score: -6.55 / 15.00 / 15.00 X-Rspamd-Queue-Id: 8AF041786 X-Rspamd-UID: b5b2bf Received-SPF: pass client-ip=80.241.56.151; envelope-from=mail@vasilij.de; helo=mout-p-101.mailbox.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/30 09:08:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --B8ONY/mu/bqBak9m Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable After opening enriched.txt and running any kind of code using the `font-lock-add-keywords` function (for example whitespace-mode or hl-todo-mode), the enriched highlighting is gone. Is this a bug or intentional? If it's intentional, is there some way for the code using `font-lock-add-keywords` to detect this condition, other than checking for the presence of enriched-mode? Alternatively, is there a recommended way to add highlighting of keywords that's compatible with enriched-mode? In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) of 2020-05-19 built on felixonmars2 Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Arch Linux Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Enriched: decoding document... Indenting... Note: file is write protected Whitespace mode enabled in current buffer You can run the command =E2=80=98whitespace-mode=E2=80=99 with M-x whit-m R= ET Whitespace mode enabled in current buffer Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft --with-wide-int --with-modules 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fno-p= lt' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2 Important settings: value of $LC_MESSAGES:=20 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: whitespace-mode: t enriched-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t use-hard-newlines: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils whitespace disp-table enriched elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 101223 9021) (symbols 48 20550 1) (miscs 40 62 154) (strings 32 29069 1125) (string-bytes 1 778480) (vectors 16 14213) (vector-slots 8 506032 11338) (floats 8 49 68) (intervals 56 902 0) (buffers 992 12)) --B8ONY/mu/bqBak9m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAl77OUYACgkQFmfJg6zC ifrFNAf/fUvJjMQzezoImI5iRHYkKATd4+6j1DqWFrZxPObxRtjA7x2zqOKIOl4I UeCIca2ktQCpxuTFe5W9aFUOgkx6R2GtXI3tcWE0s96gGv/rt7UOwUpWUq9VI7Xz 2JXBnRvw+54EvscGhLWC4DSx/3oHlJUq04VkFoRkKQY2iGvTY5I57gppjQaNiEJb /RyGKQlbtnTqd50UiadFuRmnS87b2ev/gIrXe+iv+j1SscRYgaZkwzQVTtry8hGR RAUKe/wZFpc7bk4bRUAUPyfLcU6PoGUgfHUekBs28iW5kY1M+cGn6rnZugdAOBxB tfcLMcrWU2iGEPY5AFQm4F5+fTTIVQ== =z3Bh -----END PGP SIGNATURE----- --B8ONY/mu/bqBak9m-- From unknown Sun Jun 22 08:08:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jun 2020 16:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Vasilij Schneidermann Cc: 42138@debbugs.gnu.org Received: via spool by 42138-submit@debbugs.gnu.org id=B42138.159353478431530 (code B ref 42138); Tue, 30 Jun 2020 16:34:02 +0000 Received: (at 42138) by debbugs.gnu.org; 30 Jun 2020 16:33:04 +0000 Received: from localhost ([127.0.0.1]:51547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqJBw-0008CT-0h for submit@debbugs.gnu.org; Tue, 30 Jun 2020 12:33:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqJBt-0008Bx-Jo for 42138@debbugs.gnu.org; Tue, 30 Jun 2020 12:33:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52507) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqJBn-0005bP-QV; Tue, 30 Jun 2020 12:32:55 -0400 Received: from [176.228.60.248] (port=4371 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jqJBn-0005f4-A7; Tue, 30 Jun 2020 12:32:55 -0400 Date: Tue, 30 Jun 2020 19:32:48 +0300 Message-Id: <83d05gzf7z.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <20200630130822.GE451135@odonien.localdomain> (message from Vasilij Schneidermann on Tue, 30 Jun 2020 15:08:22 +0200) References: <20200630130822.GE451135@odonien.localdomain> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 30 Jun 2020 15:08:22 +0200 > From: Vasilij Schneidermann > > After opening enriched.txt and running any kind of code using the > `font-lock-add-keywords` function (for example whitespace-mode or > hl-todo-mode), the enriched highlighting is gone. Is this a bug or > intentional? If it's intentional, is there some way for the code using > `font-lock-add-keywords` to detect this condition, other than checking > for the presence of enriched-mode? 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. > Alternatively, is there a recommended way to add highlighting of > keywords that's compatible with enriched-mode? 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). From unknown Sun Jun 22 08:08:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el 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 X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 42138@debbugs.gnu.org Received: via spool by 42138-submit@debbugs.gnu.org id=B42138.159522838729600 (code B ref 42138); Mon, 20 Jul 2020 07:00:02 +0000 Received: (at 42138) by debbugs.gnu.org; 20 Jul 2020 06:59:47 +0000 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 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 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 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) Date: Mon, 20 Jul 2020 08:59:31 +0200 From: Vasilij Schneidermann 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" 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-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --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-- From unknown Sun Jun 22 08:08:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 14:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Vasilij Schneidermann Cc: 42138@debbugs.gnu.org Received: via spool by 42138-submit@debbugs.gnu.org id=B42138.15952560303144 (code B ref 42138); Mon, 20 Jul 2020 14:41:01 +0000 Received: (at 42138) by debbugs.gnu.org; 20 Jul 2020 14:40:30 +0000 Received: from localhost ([127.0.0.1]:35798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxWxx-0000oe-U4 for submit@debbugs.gnu.org; Mon, 20 Jul 2020 10:40:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxWxw-0000oP-0n for 42138@debbugs.gnu.org; Mon, 20 Jul 2020 10:40:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35783) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jxWxq-0006CD-I3; Mon, 20 Jul 2020 10:40:22 -0400 Received: from [176.228.60.248] (port=1342 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jxWxp-0002ok-Sk; Mon, 20 Jul 2020 10:40:22 -0400 Date: Mon, 20 Jul 2020 17:40:16 +0300 Message-Id: <83o8oagshb.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <20200720065931.GA5179@odonien.localdomain> (message from Vasilij Schneidermann on Mon, 20 Jul 2020 08:59:31 +0200) References: <20200630130822.GE451135@odonien.localdomain> <83d05gzf7z.fsf@gnu.org> <20200720065931.GA5179@odonien.localdomain> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Mon, 20 Jul 2020 08:59:31 +0200 > From: Vasilij Schneidermann > Cc: 42138@debbugs.gnu.org > > > 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? I think you want to look at font-lock-defaults. > > 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`. Ah, I guess I misunderstood what kind of solutions you are looking for, sorry. If you want to keep font-lock in effect, then indeed jit-lock-register is one feature to look at. But there are two others: font-lock-extra-managed-props and the font-lock-face property. I hope one of these will allow you to come up with a solution. From unknown Sun Jun 22 08:08:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 21:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 42138@debbugs.gnu.org Received: via spool by 42138-submit@debbugs.gnu.org id=B42138.159571303616980 (code B ref 42138); Sat, 25 Jul 2020 21:38:02 +0000 Received: (at 42138) by debbugs.gnu.org; 25 Jul 2020 21:37:16 +0000 Received: from localhost ([127.0.0.1]:51277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRr1-0004Po-Ov for submit@debbugs.gnu.org; Sat, 25 Jul 2020 17:37:15 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:60024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRqz-0004Pa-8M for 42138@debbugs.gnu.org; Sat, 25 Jul 2020 17:37:14 -0400 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-202.mailbox.org (Postfix) with ESMTPS id 4BDfXz1DS1zQlHh; Sat, 25 Jul 2020 23:37:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id 3oYptxtVimR4; Sat, 25 Jul 2020 23:37:03 +0200 (CEST) Date: Sat, 25 Jul 2020 23:37:03 +0200 From: Vasilij Schneidermann Message-ID: <20200725213703.GE5179@odonien.localdomain> References: <20200630130822.GE451135@odonien.localdomain> <83d05gzf7z.fsf@gnu.org> <20200720065931.GA5179@odonien.localdomain> <83o8oagshb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cYtjc4pxslFTELvY" Content-Disposition: inline In-Reply-To: <83o8oagshb.fsf@gnu.org> X-MBO-SPAM-Probability: 0 X-Rspamd-Score: -5.09 / 15.00 / 15.00 X-Rspamd-Queue-Id: 1BFA5174A X-Rspamd-UID: d683b1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --cYtjc4pxslFTELvY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline > I think you want to look at font-lock-defaults. Thanks, checking for that did the trick. I've fixed my own mode and someone else's that way. > If you want to keep font-lock in effect, then indeed jit-lock-register is one > feature to look at. But there are two others: font-lock-extra-managed-props > and the font-lock-face property. I hope one of these will allow you to come > up with a solution. That would be better, but considerably harder. For now I'm happy with checking `font-lock-defaults`. Feel free to close this bug report. --cYtjc4pxslFTELvY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAl8cpfYACgkQFmfJg6zC ifo4rQf+LEB1MEz2GEyKQHfAe05ly6i7SFAgqH8kCpPlU9/iOypDmcNVb1iBTHJp 9fwNLwXL9TdsxBMhmVGl5wRMvcDQxoOtn0LDGNkVPmGQSVsY+3abgYhDJX6HvPlK EVFwpaKSlTsYdIz/iHGqSpcPpNvi54DImuMBq9KvWAOkqJrrYe66+xUial7dzz5d vlcEe6MIjvls/KyPz63nDhBFksTSHB+EEjaEdm6SUY0O6eH4RnUSozxpf8UaUEvH CN0yFm4VTDZ9qUnC5NeRVJhUJamt4VlK9wTBdbjdqwuNK85b2kWGFGGZ1Lr3C/Yt AsPuzYqEA5hqXRX6BaWhQ3DymywM0w== =PQDQ -----END PGP SIGNATURE----- --cYtjc4pxslFTELvY-- From unknown Sun Jun 22 08:08:23 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Vasilij Schneidermann Subject: bug#42138: closed (Re: bug#42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el) Message-ID: References: <83tuxvatx2.fsf@gnu.org> <20200630130822.GE451135@odonien.localdomain> X-Gnu-PR-Message: they-closed 42138 X-Gnu-PR-Package: emacs Reply-To: 42138@debbugs.gnu.org Date: Sun, 26 Jul 2020 02:32:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1595730721-11108-1" This is a multi-part message in MIME format... ------------=_1595730721-11108-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 42138@debbugs.gnu.org. --=20 42138: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D42138 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1595730721-11108-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 42138-done) by debbugs.gnu.org; 26 Jul 2020 02:31:58 +0000 Received: from localhost ([127.0.0.1]:51497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzWSD-0002sv-Vi for submit@debbugs.gnu.org; Sat, 25 Jul 2020 22:31:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzWSA-0002se-IS for 42138-done@debbugs.gnu.org; Sat, 25 Jul 2020 22:31:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55406) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzWS4-00084a-OE; Sat, 25 Jul 2020 22:31:48 -0400 Received: from [176.228.60.248] (port=2500 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jzWS3-0005HF-SP; Sat, 25 Jul 2020 22:31:48 -0400 Date: Sun, 26 Jul 2020 05:31:37 +0300 Message-Id: <83tuxvatx2.fsf@gnu.org> From: Eli Zaretskii To: Vasilij Schneidermann In-Reply-To: <20200725213703.GE5179@odonien.localdomain> (message from Vasilij Schneidermann on Sat, 25 Jul 2020 23:37:03 +0200) Subject: Re: bug#42138: 26.3; Incompatibility between font-lock-add-keywords and enriched.el References: <20200630130822.GE451135@odonien.localdomain> <83d05gzf7z.fsf@gnu.org> <20200720065931.GA5179@odonien.localdomain> <83o8oagshb.fsf@gnu.org> <20200725213703.GE5179@odonien.localdomain> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42138-done Cc: 42138-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 25 Jul 2020 23:37:03 +0200 > From: Vasilij Schneidermann > Cc: 42138@debbugs.gnu.org > > That would be better, but considerably harder. For now I'm happy with checking > `font-lock-defaults`. Feel free to close this bug report. Done. ------------=_1595730721-11108-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jun 2020 13:08:33 +0000 Received: from localhost ([127.0.0.1]:50437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqG00-0000sA-Nu for submit@debbugs.gnu.org; Tue, 30 Jun 2020 09:08:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:58114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqFzy-0000s1-Kf for submit@debbugs.gnu.org; Tue, 30 Jun 2020 09:08:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqFzy-0005DO-Ea for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 09:08:30 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:38274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1jqFzw-0001l0-8A for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 09:08:30 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (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 49x4RZ4Sc8zKmtM for ; Tue, 30 Jun 2020 15:08:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id C2f37n8Cji16 for ; Tue, 30 Jun 2020 15:08:23 +0200 (CEST) Date: Tue, 30 Jun 2020 15:08:22 +0200 From: Vasilij Schneidermann To: bug-gnu-emacs@gnu.org Subject: 26.3; Incompatibility between font-lock-add-keywords and enriched.el Message-ID: <20200630130822.GE451135@odonien.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B8ONY/mu/bqBak9m" Content-Disposition: inline X-MBO-SPAM-Probability: 0 X-Rspamd-Score: -6.55 / 15.00 / 15.00 X-Rspamd-Queue-Id: 8AF041786 X-Rspamd-UID: b5b2bf Received-SPF: pass client-ip=80.241.56.151; envelope-from=mail@vasilij.de; helo=mout-p-101.mailbox.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/30 09:08:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --B8ONY/mu/bqBak9m Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable After opening enriched.txt and running any kind of code using the `font-lock-add-keywords` function (for example whitespace-mode or hl-todo-mode), the enriched highlighting is gone. Is this a bug or intentional? If it's intentional, is there some way for the code using `font-lock-add-keywords` to detect this condition, other than checking for the presence of enriched-mode? Alternatively, is there a recommended way to add highlighting of keywords that's compatible with enriched-mode? In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) of 2020-05-19 built on felixonmars2 Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Arch Linux Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Enriched: decoding document... Indenting... Note: file is write protected Whitespace mode enabled in current buffer You can run the command =E2=80=98whitespace-mode=E2=80=99 with M-x whit-m R= ET Whitespace mode enabled in current buffer Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft --with-wide-int --with-modules 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fno-p= lt' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2 Important settings: value of $LC_MESSAGES:=20 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: whitespace-mode: t enriched-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t use-hard-newlines: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils whitespace disp-table enriched elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 101223 9021) (symbols 48 20550 1) (miscs 40 62 154) (strings 32 29069 1125) (string-bytes 1 778480) (vectors 16 14213) (vector-slots 8 506032 11338) (floats 8 49 68) (intervals 56 902 0) (buffers 992 12)) --B8ONY/mu/bqBak9m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAl77OUYACgkQFmfJg6zC ifrFNAf/fUvJjMQzezoImI5iRHYkKATd4+6j1DqWFrZxPObxRtjA7x2zqOKIOl4I UeCIca2ktQCpxuTFe5W9aFUOgkx6R2GtXI3tcWE0s96gGv/rt7UOwUpWUq9VI7Xz 2JXBnRvw+54EvscGhLWC4DSx/3oHlJUq04VkFoRkKQY2iGvTY5I57gppjQaNiEJb /RyGKQlbtnTqd50UiadFuRmnS87b2ev/gIrXe+iv+j1SscRYgaZkwzQVTtry8hGR RAUKe/wZFpc7bk4bRUAUPyfLcU6PoGUgfHUekBs28iW5kY1M+cGn6rnZugdAOBxB tfcLMcrWU2iGEPY5AFQm4F5+fTTIVQ== =z3Bh -----END PGP SIGNATURE----- --B8ONY/mu/bqBak9m-- ------------=_1595730721-11108-1--