Allow custom prompt in own Org location query function
This commit is contained in:
parent
e6b2f9eefb
commit
cff1c86d0b
@ -1861,11 +1861,11 @@ not."
|
||||
(t (user-error "Neither ID nor CUSTOM_ID given")))))
|
||||
(org-search-view nil query)))
|
||||
|
||||
(defun db/org-get-location (&optional use-all-org-files initial-input)
|
||||
(defun db/org-get-location (&optional use-all-org-files initial-input prompt)
|
||||
"Interactively query for location and return mark.
|
||||
|
||||
Use INITIAL-INPUT as initial input when filtering available
|
||||
locations.
|
||||
locations. Use PROMPT as prompt when given.
|
||||
|
||||
When USE-ALL-ORG-FILES is nil, this functions by default searches
|
||||
through the current buffer if that one is an Org buffer and is
|
||||
@ -1910,7 +1910,7 @@ linking to any item."
|
||||
(consult--read (consult--slow-operation "Collecting headings..."
|
||||
(or (consult-org--headings t nil scope)
|
||||
(user-error "No headings")))
|
||||
:prompt "Choose heading: "
|
||||
:prompt (or prompt "Choose heading: ")
|
||||
:category 'org-heading
|
||||
:sort nil
|
||||
:initial initial-input
|
||||
|
||||
Loading…
Reference in New Issue
Block a user