Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat): enable nested captures #966

Merged
merged 2 commits into from
Jul 26, 2020
Merged

(feat): enable nested captures #966

merged 2 commits into from
Jul 26, 2020

Conversation

jethrokuan
Copy link
Member

@jethrokuan jethrokuan commented Jul 24, 2020

This PR enables the long-awaited nested-captures.

This PR introduces a number of changes:

  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.

nested

@jethrokuan jethrokuan force-pushed the feat/nested-capture branch from 1b1c942 to 87543bf Compare July 24, 2020 10:05
@jethrokuan
Copy link
Member Author

Supercedes #527

@jethrokuan jethrokuan force-pushed the feat/nested-capture branch from 017ef69 to ce477f3 Compare July 24, 2020 11:23
@jethrokuan
Copy link
Member Author

another issue: point isn't advanced after link insertion

@zaeph zaeph self-assigned this Jul 24, 2020
@zaeph
Copy link
Member

zaeph commented Jul 24, 2020

I'll have a look in the morning to see if I can come up with a solution for the snags.

@zaeph zaeph force-pushed the feat/nested-capture branch from 3176271 to 49a478c Compare July 25, 2020 20:05
@zaeph
Copy link
Member

zaeph commented Jul 25, 2020

Re: 770a4a1.
I've sent a patch upstream. Let's keep the extra hook for now, and remove it if the patch gets merged.

@zaeph
Copy link
Member

zaeph commented Jul 25, 2020

49a478c was functional, but I didn't like the implementation. Tomorrow, I'd like to our custom get/put, now that I've grokked how it works upstream.

@zaeph zaeph force-pushed the feat/nested-capture branch from 1e55cbf to c138715 Compare July 26, 2020 05:50
@zaeph
Copy link
Member

zaeph commented Jul 26, 2020

Here's the upstream patch.

@jethrokuan jethrokuan force-pushed the feat/nested-capture branch 2 times, most recently from 29c65d2 to a61c42e Compare July 26, 2020 16:03
@jethrokuan jethrokuan force-pushed the feat/nested-capture branch from a61c42e to 5c9bb92 Compare July 26, 2020 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants