mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(feat): enable nested captures (#966)
This PR enables the long-awaited nested-captures. 1. Adds a hook to org-capture-prepare-finalize-hook, which installs org-roam-capture--finalize into org-capture-after-finalize-hook if the capture is an Org-roam capture. This function contains key functionality for Org-roam to Do The Right Thing after specific interactive functions, such as finding the file, or inserting a link. 2. A patch for org-capture-finalize. Specifically, we make org-capture-plist valid during org-capture-finalize. 3. Many hacks that were originally in place are now replaced with nicer alternatives. Co-authored-by: Leo Vivier <zaephon@gmail.com>
This commit is contained in:
@ -103,7 +103,7 @@ Template string :\n%v")
|
||||
(let ((org-roam-capture-templates org-roam-dailies-capture-templates)
|
||||
(org-roam-capture--info (list (cons 'time time)))
|
||||
(org-roam-capture--context 'dailies))
|
||||
(add-hook 'org-capture-after-finalize-hook #'org-roam-capture--find-file-h)
|
||||
(setq org-roam-capture-additional-template-props (list :finalize 'find-file))
|
||||
(org-roam--with-template-error 'org-roam-dailies-capture-templates
|
||||
(org-roam-capture--capture))))
|
||||
|
||||
|
Reference in New Issue
Block a user