branch: externals/embark
commit e8be2ed28a0d321a3bdc119f31289ce722668329
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    embark-consult--export-grep: Call compilation--ensure-parse
    
    Fix #762
---
 embark-consult.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/embark-consult.el b/embark-consult.el
index 6c61affe65..4cbe966765 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -210,6 +210,7 @@ This function is meant to be added to 
`embark-collect-mode-hook'."
 
 (defvar grep-mode-line-matches)
 (defvar grep-num-matches-found)
+(declare-function compilation--ensure-parse "compile")
 (declare-function wgrep-setup "ext:wgrep")
 
 (defvar-keymap embark-consult-rerun-map
@@ -232,7 +233,11 @@ The function FOOTER is called to insert a footer."
         (dlet ((compilation-filter-start (point)))
           (setq-local grep-num-matches-found (funcall insert lines))
           (goto-char (point-max))
-          ;; Emacs 30 feature `grep-use-headings'
+          ;; Ensure that all `compilation-message' text properties are added.
+          (compilation--ensure-parse (point))
+          ;; Instead of (run-hooks 'compilation-filter-hook), we only run the
+          ;; Emacs 30 grep heading filter. The other `compilation-filter-hook'
+          ;; functions handle escape sequences, which we do not need here.
           (when (and (bound-and-true-p grep-use-headings)
                      (fboundp 'grep--heading-filter))
             (grep--heading-filter))

Reply via email to