emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/consult 40d784f18f: consult-org-heading: Support Embark


From: ELPA Syncer
Subject: [elpa] externals/consult 40d784f18f: consult-org-heading: Support Embark actions
Date: Thu, 14 Sep 2023 03:57:33 -0400 (EDT)

branch: externals/consult
commit 40d784f18fb6792f3f11b6b1f3f48db17a12de1c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    consult-org-heading: Support Embark actions
    
    See https://github.com/oantolin/embark/issues/639
---
 CHANGELOG.org  | 2 ++
 consult-org.el | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 960fb2c2b2..b21a973ae5 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -6,6 +6,8 @@
 
 - =consult-fd=: New command based on the fast =fd/fdfind= search utility.
 - =consult-outline=: New prefix argument to specify initial narrowing level.
+- =consult-org-heading=: Specify category =org-remote-heading= such that Embark
+  provides appropriate Org heading actions.
 
 * Version 0.35 (2023-07-02)
 
diff --git a/consult-org.el b/consult-org.el
index ed96e39b0a..1880f54b19 100644
--- a/consult-org.el
+++ b/consult-org.el
@@ -84,7 +84,7 @@ MATCH, SCOPE and SKIP are as in `org-map-entries'."
                               tags (consult--tofu-encode idx))))
          (cl-incf idx)
          (add-text-properties 0 1
-                              `(consult--candidate ,(point-marker)
+                              `(org-marker ,(point-marker)
                                 consult-org--heading (,level ,todo . ,prio))
                               cand)
          cand))
@@ -105,7 +105,7 @@ buffer are offered."
        (or (consult-org--headings prefix match scope)
            (user-error "No headings")))
      :prompt "Go to heading: "
-     :category 'consult-org-heading
+     :category 'org-remote-heading ;; Category for Embark support
      :sort nil
      :require-match t
      :history '(:input consult-org--history)
@@ -116,9 +116,9 @@ buffer are offered."
        (lambda (cand transform)
          (let ((name (buffer-name
                       (marker-buffer
-                       (get-text-property 0 'consult--candidate cand)))))
+                       (get-text-property 0 'org-marker cand)))))
            (if transform (substring cand (1+ (length name))) name))))
-     :lookup #'consult--lookup-candidate)))
+     :lookup (apply-partially #'consult--lookup-prop 'org-marker))))
 
 ;;;###autoload
 (defun consult-org-agenda (&optional match)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]