From d80b71fb729a83739cd08fb52b434bcf2a999625 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Thu, 22 May 2025 20:39:46 +0200 Subject: [PATCH] Revert usage of `consult-org-agenda` This reverts commit 96ac10216e6049262a46b2f2341efc2bd35a14d1. Not yet it, but close. --- site-lisp/db-org.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index c97b314..9905225 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -1302,7 +1302,18 @@ Current Task: %s(replace-regexp-in-string \"%\" \"%%\" (or org-clock-current-tas " ("c" (db/org-clock-goto-first-open-checkbox nil) nil) - ("a" consult-org-agenda + ("a" (with-current-buffer + ;; Make sure we are in some Org buffer, as `org-refile-get-location' + ;; might try to parse the current buffer in search for some Org + ;; headings, possibly producing errors along the way. + (->> (org-agenda-files :unrestricted) + cl-first + get-file-buffer) + ;; Show all possible items, i.e. exclude refile verification; since the + ;; cache includes only verified items, also disable it locally. + (let ((org-refile-use-cache nil) + (org-refile-target-verify-function nil)) + (org-refile '(4)))) nil) ("s" (db/org-clock-goto-first-open-checkbox t) nil))