Last active
July 28, 2023 06:18
-
-
Save jsrjenkins/7c58299a5c53778767152464234fed45 to your computer and use it in GitHub Desktop.
Org Capture for Conkeror
This file contains 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
;; place this snippit in your .init.el or with your the other | |
;; org-capture templates to capture web pages. | |
(setq org-capture-templates | |
'(("w" "Web Notes" entry ;; 'w' for 'org-protocol' | |
file+headline "~/org/notes.org" "WWW") | |
"* %^{Title}\n\n Source: %u, %c\n\n %i") )) |
This file contains 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
// org-protocol: allows you to capture the url, title and selection | |
// and insert it into your notes.org file | |
// you will need to setup org-capture-templates to receive it. | |
function org_capture (url, title, selection, window) { | |
var cmd_str = | |
'emacsclient \"org-protocol:/capture:/w/'+url+'/'+title+'/'+selection+'\"'; | |
if (window != null) { | |
window.minibuffer.message('Issuing ' + cmd_str); | |
} | |
shell_command_blind(cmd_str); | |
} | |
interactive("org-capture", "Clip url, title, and selection to capture via org-protocol", | |
function (I) { | |
org_capture(encodeURIComponent(I.buffer.display_uri_string), | |
encodeURIComponent(I.buffer.top_frame.getSelection()), | |
I.window); | |
}); | |
// capture with C-c c | |
define_key(content_buffer_normal_keymap, "C-c c", "org-capture"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment