Allow org-roam-protocol to capture the webpage's selection#1239
Merged
zaeph merged 7 commits intoorg-roam:masterfrom Nov 8, 2020
Merged
Allow org-roam-protocol to capture the webpage's selection#1239zaeph merged 7 commits intoorg-roam:masterfrom
zaeph merged 7 commits intoorg-roam:masterfrom
Conversation
* org-roam-protocol.el (org-roam-protocol-open-ref): Replicate default `org-protocol' behaviour temporarily for storing links * org-roam-capture.el (org-roam-capture--capture): Prevent stored link from being reset When capturing a web-page with org-roam-protocol, a link is now temporarily stored in `org-store-link-plist' via `org-link-store-props'. This is to allow the forwarding of properties to `org-capture', one of them being `:initial' which contains the content of the selected text in the browser.
* org-roam-protocol.el (org-roam-protocol-store-links): Add new toggle (org-roam-protocol-open-ref): Conditionally store link for later used Building up on b2ee5f2, the user can now decide whether to store links when capturing with org-roam-protocol (default nil).
Member
Author
|
Using the |
Member
|
See also #1088 |
As seen in org-roam#1088. Co-authored-by: Russell Sim <russell.sim@gmail.com>
Member
Author
|
Thanks for pointing it out, @jethrokuan, hadn't caught up on that PR yet. Considering the wild variety of notes people are making, I think we shouldn't include
I vote for merging this now, and addressing the incremental reading stuff in another PR. |
I believe we’re always going to have a ref, so no need to check for nil.
jethrokuan
reviewed
Nov 8, 2020
Added by lispy, but this is probably an edge-case that it isn’t managing.
jethrokuan
approved these changes
Nov 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I believe we supported this feature a while ago, but an iteration must have overridden it.
You can now use
%iinorg-roam-capture-ref-templatesto insert the selected text on the web-page you are capturing. Note that it can either appear in:head(expanded once on file creation) or in the body of the template (expanded every time the ORP is called on a given webpage). The latter makes it a good option for incremental reading.Here's a use-case:
You need to make sure that you have the proper bookmarklet (note the
template=rto specify which template to use`):