Use default buffer for Org location queries
This commit is contained in:
parent
928ef10ac5
commit
fb8b2837d5
@ -1905,20 +1905,21 @@ linking to any item."
|
|||||||
(t
|
(t
|
||||||
(list (buffer-file-name default-buffer)))))
|
(list (buffer-file-name default-buffer)))))
|
||||||
|
|
||||||
(pom (consult--read (consult--slow-operation "Collecting headings..."
|
(pom (with-current-buffer default-buffer
|
||||||
(or (consult-org--headings nil nil scope)
|
(consult--read (consult--slow-operation "Collecting headings..."
|
||||||
(user-error "No headings")))
|
(or (consult-org--headings nil nil scope)
|
||||||
:prompt "Go to heading: "
|
(user-error "No headings")))
|
||||||
:category 'org-heading
|
:prompt "Go to heading: "
|
||||||
:sort nil
|
:category 'org-heading
|
||||||
:initial initial-input
|
:sort nil
|
||||||
:require-match t
|
:initial initial-input
|
||||||
:history '(:input consult-org--history)
|
:require-match t
|
||||||
:narrow (consult-org--narrow)
|
:history '(:input consult-org--history)
|
||||||
:annotate #'consult-org--annotate
|
:narrow (consult-org--narrow)
|
||||||
:group #'consult-org--group
|
:annotate #'consult-org--annotate
|
||||||
:lookup (apply-partially #'consult--lookup-prop 'org-marker)
|
:group #'consult-org--group
|
||||||
:preview-key nil)))
|
:lookup (apply-partially #'consult--lookup-prop 'org-marker)
|
||||||
|
:preview-key nil))))
|
||||||
(if (markerp pom)
|
(if (markerp pom)
|
||||||
pom
|
pom
|
||||||
(user-error "Invalid location")))))
|
(user-error "Invalid location")))))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user