Function: org-roam-capture--finalize
org-roam-capture--finalize is a byte-compiled function defined in
org-roam-capture.el.
Signature
(org-roam-capture--finalize)
Documentation
Finalize the org-roam-capture process.
Source Code
;; Defined in ~/.emacs.d/elpa/org-roam-20260224.1637/org-roam-capture.el
(defun org-roam-capture--finalize ()
"Finalize the `org-roam-capture' process."
(if org-note-abort
(when-let* ((new-file (org-roam-capture--get :new-file))
(_ (yes-or-no-p "Delete file for aborted capture?")))
(when (find-buffer-visiting new-file)
(kill-buffer (find-buffer-visiting new-file)))
(delete-file new-file))
(when-let* ((buffer (plist-get org-capture-plist :buffer))
(file (buffer-file-name buffer)))
(org-id-add-location (org-roam-capture--get :id) file))
(when-let* ((finalize (org-roam-capture--get :finalize))
(org-roam-finalize-fn (intern (concat "org-roam-capture--finalize-"
(symbol-name finalize)))))
(if (functionp org-roam-finalize-fn)
(funcall org-roam-finalize-fn)
(funcall finalize))))
(remove-hook 'org-capture-after-finalize-hook #'org-roam-capture--finalize))