Browse Source

Clear refile cache when updating the headline of an org mode item

master
Daniel Borchmann 3 months ago
parent
commit
fdc32eaa6d
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
  1. 7
      site-lisp/db-org.el

7
site-lisp/db-org.el

@ -691,7 +691,9 @@ it. Adds newline before and after the template."
(defun db/org-update-headline-log-note (&optional new-headline)
"Replace headline of item at point with NEW-HEADLINE.
Interactively query for HEADLINE when not provided."
Interactively query for HEADLINE when not provided. Clear refile
cache if that's in use."
(interactive)
(unless (derived-mode-p 'org-mode 'org-agenda-mode)
@ -735,6 +737,9 @@ Interactively query for HEADLINE when not provided."
(indent-according-to-mode)
(insert (format " Changed headline from: %s\n" old-headline)))))
(when org-refile-use-cache
(org-refile-cache-clear))
(when (derived-mode-p 'org-agenda-mode)
(org-agenda-redo)))

Loading…
Cancel
Save