From 44fb922b66077f5a2efe61a930e85333b44c0dd2 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 17 Aug 2025 15:47:50 +0200 Subject: [PATCH] Allow custom prompt in own Org location query function --- site-lisp/db-org.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index a58632b..3eb516b 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -1863,11 +1863,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 @@ -1912,7 +1912,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