branch: externals/embark
commit 755cb49b59801ff420193cc0e3b1a7aa12bf22e3
Merge: d2daad08e0 872c1db476
Author: Omar Antolín Camarena <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #747 from minad/use-headings
    
    Add support for `grep-use-headings`
---
 avy-embark-collect.el |  4 ++--
 embark-consult.el     | 23 ++++++++++++++---------
 embark-org.el         |  2 +-
 embark.el             | 13 +++++++------
 4 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/avy-embark-collect.el b/avy-embark-collect.el
index fbfd46a263..aba692b111 100644
--- a/avy-embark-collect.el
+++ b/avy-embark-collect.el
@@ -1,11 +1,11 @@
 ;;; avy-embark-collect.el --- Use avy to jump to Embark Collect entries  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2020  Omar Antolín Camarena
+;; Copyright (C) 2020-2025  Omar Antolín Camarena
 
 ;; Author: Omar Antolín Camarena <[email protected]>
 ;; Keywords: convenience
 ;; Version: 0.3
-;; Homepage: https://github.com/oantolin/embark
+;; URL: https://github.com/oantolin/embark
 ;; Package-Requires: ((emacs "25.1") (embark "0.9") (avy "0.5"))
 
 ;; This program is free software; you can redistribute it and/or modify
diff --git a/embark-consult.el b/embark-consult.el
index c4881ba46f..24d3992c68 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -1,12 +1,12 @@
 ;;; embark-consult.el --- Consult integration for Embark -*- lexical-binding: 
t; -*-
 
-;; Copyright (C) 2021-2023  Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025  Free Software Foundation, Inc.
 
 ;; Author: Omar Antolín Camarena <[email protected]>
 ;; Maintainer: Omar Antolín Camarena <[email protected]>
 ;; Keywords: convenience
 ;; Version: 1.1
-;; Homepage: https://github.com/oantolin/embark
+;; URL: https://github.com/oantolin/embark
 ;; Package-Requires: ((emacs "28.1") (compat "30") (embark "1.1") (consult 
"1.8"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -225,13 +225,18 @@ count of the matches (there may be more than one match 
per line).
 The function FOOTER is called to insert a footer."
   (let ((buf (generate-new-buffer "*Embark Export Grep*")))
     (with-current-buffer buf
-      (insert (propertize header 'wgrep-header t 'front-sticky t))
-      (let ((count (funcall insert lines)))
-        (funcall footer)
-        (goto-char (point-min))
-        (grep-mode)
-        (setq-local grep-num-matches-found count
-                    mode-line-process grep-mode-line-matches))
+      (grep-mode)
+      (setq-local mode-line-process grep-mode-line-matches)
+      (let ((inhibit-read-only t))
+        (insert (propertize header 'wgrep-header t 'front-sticky t))
+        (dlet ((compilation-filter-start (point)))
+          (setq-local grep-num-matches-found (funcall insert lines))
+          ;; Emacs 30 feature `grep-use-headings'
+          (when (and (bound-and-true-p grep-use-headings)
+                     (fboundp 'grep--heading-filter))
+            (grep--heading-filter))
+          (funcall footer)
+          (goto-char (point-min))))
       ;; Make this buffer current for next/previous-error
       (setq next-error-last-buffer buf)
       ;; Set up keymap before possible wgrep-setup, so that wgrep
diff --git a/embark-org.el b/embark-org.el
index f2816b1930..bf13fde0fb 100644
--- a/embark-org.el
+++ b/embark-org.el
@@ -1,6 +1,6 @@
 ;;; embark-org.el --- Embark targets and actions for Org Mode  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2022-2023  Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025  Free Software Foundation, Inc.
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff --git a/embark.el b/embark.el
index 86d72310e3..a055e90875 100644
--- a/embark.el
+++ b/embark.el
@@ -1,12 +1,12 @@
 ;;; embark.el --- Conveniently act on minibuffer completions   -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2021-2023  Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025  Free Software Foundation, Inc.
 
 ;; Author: Omar Antolín Camarena <[email protected]>
 ;; Maintainer: Omar Antolín Camarena <[email protected]>
 ;; Keywords: convenience
 ;; Version: 1.1
-;; Homepage: https://github.com/oantolin/embark
+;; URL: https://github.com/oantolin/embark
 ;; Package-Requires: ((emacs "28.1") (compat "30"))
 
 ;; This file is part of GNU Emacs.
@@ -121,7 +121,8 @@
 (defgroup embark nil
   "Emacs Mini-Buffer Actions Rooted in Keymaps."
   :link '(info-link :tag "Info Manual" "(embark)")
-  :link '(url-link :tag "Homepage" "https://github.com/oantolin/embark";)
+  :link '(url-link :tag "Website" "https://github.com/oantolin/embark";)
+  :link '(url-link :tag "Wiki" "https://github.com/oantolin/embark/wiki";)
   :link '(emacs-library-link :tag "Library Source" "embark.el")
   :group 'minibuffer
   :prefix "embark-")
@@ -403,7 +404,7 @@ the key :always are executed always."
     (embark-kill-buffer-and-window embark--confirm)
     (bookmark-delete embark--confirm)
     (package-delete embark--confirm)
-    (,'tab-bar-close-tab-by-name embark--confirm) ;; Avoid package-lint warning
+    (tab-bar-close-tab-by-name embark--confirm)
     ;; search for region contents outside said region
     (embark-isearch-forward embark--unmark-target)
     (embark-isearch-backward embark--unmark-target)
@@ -440,8 +441,8 @@ arguments and more details."
     (make-directory embark--restart)
     (kill-buffer embark--restart)
     (embark-rename-buffer embark--restart)
-    (,'tab-bar-rename-tab-by-name embark--restart) ;; Avoid package-lint 
warning
-    (,'tab-bar-close-tab-by-name embark--restart)
+    (tab-bar-rename-tab-by-name embark--restart)
+    (tab-bar-close-tab-by-name embark--restart)
     (package-delete embark--restart))
   "Alist associating commands with post-action hooks.
 The hooks are run after an embarked upon action concludes.  See

Reply via email to