Add org-capture template for Conkeror
This commit is contained in:
parent
1e46767718
commit
b3bd639206
2 changed files with 30 additions and 2 deletions
|
@ -99,6 +99,34 @@ interactive("org-store-link",
|
||||||
+ "kill ring",
|
+ "kill ring",
|
||||||
oni_org_store_link);
|
oni_org_store_link);
|
||||||
|
|
||||||
|
function org_capture(url, title, body, window, template) {
|
||||||
|
template = template || '';
|
||||||
|
var cmd_str = 'emacsclient "org-protocol://capture:/'+template+'/'+url+'/'+title+'/'+body+'"';
|
||||||
|
|
||||||
|
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.document.title),
|
||||||
|
encodeURIComponent(I.buffer.top_frame.getSelection()),
|
||||||
|
I.window);
|
||||||
|
});
|
||||||
|
interactive("org-capture-taiga", "Capture a Taiga task via org-protocol",
|
||||||
|
function(I) {
|
||||||
|
var title = I.buffer.document.getElementsByClassName('view-subject')[0].childNodes[0].nodeValue,
|
||||||
|
body = I.buffer.document.getElementsByClassName('markItUpEditor')[0].value;
|
||||||
|
org_capture(encodeURIComponent(I.buffer.display_uri_string),
|
||||||
|
encodeURIComponent(title),
|
||||||
|
encodeURIComponent(body),
|
||||||
|
I.window,
|
||||||
|
'w');
|
||||||
|
});
|
||||||
|
|
||||||
interactive("find-url-from-history",
|
interactive("find-url-from-history",
|
||||||
"Find a page from history in the current buffer",
|
"Find a page from history in the current buffer",
|
||||||
"find-url",
|
"find-url",
|
||||||
|
|
|
@ -153,8 +153,8 @@ predecessor if there is a non-DONE sibling defined before it."
|
||||||
("d" "10 things to do today" entry (file+datetree "~/documents/org/dailies.org")
|
("d" "10 things to do today" entry (file+datetree "~/documents/org/dailies.org")
|
||||||
"* %<%R> [0/10]\n\n - [ ] %?\n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] "
|
"* %<%R> [0/10]\n\n - [ ] %?\n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] \n - [ ] "
|
||||||
:empty-lines-before 1)
|
:empty-lines-before 1)
|
||||||
("w" "Taiga task" entry (file+headline "~/documents/org/tasks" "Inbox")
|
("w" "Org protocol task" entry (file+headline "~/documents/org/tasks" "Inbox")
|
||||||
(function taiga-org-task-template)
|
"* TODO %^{Title|%:description}\n\n Source: %u, %c\n\n %i"
|
||||||
:empty-lines-before 1)))
|
:empty-lines-before 1)))
|
||||||
(setq org-contacts-files '("~/documents/org/misc/contacts.org"))
|
(setq org-contacts-files '("~/documents/org/misc/contacts.org"))
|
||||||
(setq org-agenda-show-outline-path nil)
|
(setq org-agenda-show-outline-path nil)
|
||||||
|
|
Loading…
Reference in a new issue