mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(feat): Allow ORP to capture the webpage's selection (#1239)
* (feat): Temporarily store link when capturing with ORP
* 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.
* (feat): Add toggle for storing link when capturing with ORP
* 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 b2ee5f2c68
, the user can now
decide whether to store links when capturing with org-roam-protocol (default
nil).
* Update changelog
This commit is contained in:
@ -512,7 +512,8 @@ GOTO and KEYS argument have the same functionality as
|
||||
`org-capture'."
|
||||
(let* ((org-capture-templates (mapcar #'org-roam-capture--convert-template org-roam-capture-templates))
|
||||
(one-template-p (= (length org-capture-templates) 1))
|
||||
org-capture-templates-contexts)
|
||||
org-capture-templates-contexts
|
||||
(org-capture-link-is-already-stored t))
|
||||
(when one-template-p
|
||||
(setq keys (caar org-capture-templates)))
|
||||
(if (or one-template-p
|
||||
|
Reference in New Issue
Block a user