branch: externals/consult commit 67ae62d4a96f9e785d0ff306631b746b91e6fb4f Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Revert "consult-org-heading: Add annotation (priority & todo kwd) (#845)" This reverts commit 38f156381b8154880d84f63718b1099ead7c284d. This reverts commit 61bb1c405912891bd06b89bda5c7ebc90370d4c8. Hold this back until copyright assignment status has been clarified. --- CHANGELOG.org | 1 - consult-org.el | 26 +------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index c6a49aa152..960fb2c2b2 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -6,7 +6,6 @@ - =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=: Add annotation function. * Version 0.35 (2023-07-02) diff --git a/consult-org.el b/consult-org.el index 5f8c887c64..ed96e39b0a 100644 --- a/consult-org.el +++ b/consult-org.el @@ -90,29 +90,6 @@ MATCH, SCOPE and SKIP are as in `org-map-entries'." cand)) match scope skip))) -(defun consult-org--annotate () - "Generate annotation function for `consult-org-heading'." - (let (buf) - (when (derived-mode-p #'org-mode) - (setq buf (current-buffer))) - (lambda (cand) - (unless (buffer-live-p buf) - (setq buf (seq-find - (lambda (b) - (with-current-buffer b (derived-mode-p #'org-mode))) - (buffer-list)))) - (consult--annotate-align - cand - (pcase-let ((`(,_level ,kwd . ,prio) - (get-text-property 0 'consult-org--heading cand))) - (when (or kwd prio) - (concat - (propertize (or kwd "") 'face - (with-current-buffer (or buf (current-buffer)) - ;; `org-get-todo-face' must be called inside an Org buffer - (org-get-todo-face kwd))) - (and prio (format #(" [#%c]" 1 6 (face org-priority)) prio))))))))) - ;;;###autoload (defun consult-org-heading (&optional match scope) "Jump to an Org heading. @@ -120,7 +97,7 @@ MATCH, SCOPE and SKIP are as in `org-map-entries'." MATCH and SCOPE are as in `org-map-entries' and determine which entries are offered. By default, all entries of the current buffer are offered." - (interactive (unless (derived-mode-p #'org-mode) + (interactive (unless (derived-mode-p 'org-mode) (user-error "Must be called from an Org buffer"))) (let ((prefix (not (memq scope '(nil tree region region-start-level file))))) (consult--read @@ -134,7 +111,6 @@ buffer are offered." :history '(:input consult-org--history) :narrow (consult-org--narrow) :state (consult--jump-state) - :annotate (consult-org--annotate) :group (when prefix (lambda (cand transform)