Skip to content

Instantly share code, notes, and snippets.

@jmn
Last active August 29, 2015 14:21
Show Gist options
  • Save jmn/f85444b2fbe4f7b1b37d to your computer and use it in GitHub Desktop.
Save jmn/f85444b2fbe4f7b1b37d to your computer and use it in GitHub Desktop.
.keysnailrc config to create "M-x bookmark-with-org" which uses org-protocol to org-capture the URL, title and selection in the browser.
ext.add("bookmark-with-org",
function (aEvent, aArg) {
var od = window.content.document;
window.loadURI('org-protocol://capture://n/'+encodeURIComponent(od.location.href)+'/'+encodeURIComponent(od.title)+'/'+encodeURIComponent(window.getSelection()));
}, M({en: "Save bookmark in Emacs org-mode using org-protocol"}));
key.setGlobalKey(['C-x', 'r', 'm'], function (aEvent) {
ext.exec("bookmark-with-org", aEvent);
}, 'Bookmark in Emacs org-mode', true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment