From: Michael Heerdegen <michael_heerdegen@web.de>
To: 56423@debbugs.gnu.org
Subject: bug#56423: 29.0.50; Hi-lock in dired broken by toggling wdired-mode
Date: Wed, 06 Jul 2022 18:22:36 +0200 [thread overview]
Message-ID: <874jzui52r.fsf@web.de> (raw)
Hello,
in a dired buffer, M-x hi-lock-face-buffer RET and enter a pattern so
that there are matches. Then M-x wdired-change-to-wdired-mode and edit
something (insert a char or so). Hi-Lock highlighting immediately
disappears. Changing back to normal dired doesn't let highlighting
reappear. That's not good. I would like highlighting to stay when
starting or finishing `wdired-mode'.
The (only) reason for this is that when toggling `wdired-mode' the
hi-lock pattern rules added to `font-lock-keywords' are gone (why?).
So this fixes the problem for me:
#+begin_src emacs-lisp
(defun my-wdired-run-font-lock-mode-hook (&rest _)
"Necessary to get hi-lock survive toggling `wdired-mode'."
(run-hooks 'font-lock-mode-hook))
(dolist (f `(,#'wdired-change-to-wdired-mode
,#'wdired-finish-edit
,#'wdired-abort-changes))
(advice-add f :after #'my-wdired-run-font-lock-mode-hook))
#+end_src
Running `hi-lock-font-lock-hook' instead of the complete
`font-lock-mode-hook' also works.
I would like to know why this is necessary at all, and what a correct
fix that can be installed would look like.
TIA,
Michael.
In GNU Emacs 29.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
of 2022-07-06 built on drachen
Repository revision: b2df1cc19c2312b27f7bab6b3eb7d339f668113d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)
next reply other threads:[~2022-07-06 16:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 16:22 Michael Heerdegen [this message]
2022-07-06 18:58 ` bug#56423: 29.0.50; Hi-lock in dired broken by toggling wdired-mode Michael Heerdegen
2022-07-06 19:19 ` Michael Heerdegen
2022-07-07 5:35 ` Eli Zaretskii
2022-07-07 10:26 ` Michael Heerdegen
2022-07-07 10:35 ` Eli Zaretskii
2022-07-07 11:14 ` Michael Heerdegen
2022-07-07 13:29 ` Eli Zaretskii
2022-07-07 15:09 ` Michael Heerdegen
2022-07-07 15:19 ` Michael Heerdegen
2022-07-07 16:03 ` Eli Zaretskii
2022-07-08 12:04 ` Michael Heerdegen
2022-07-08 12:22 ` Eli Zaretskii
2022-07-08 12:57 ` Michael Heerdegen
2022-07-08 12:59 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jzui52r.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=56423@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.