Skip to content

Instantly share code, notes, and snippets.

@jmercouris
Created January 17, 2018 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmercouris/5e0879d8014eb6d810cfc293a466cd0b to your computer and use it in GitHub Desktop.
Save jmercouris/5e0879d8014eb6d810cfc293a466cd0b to your computer and use it in GitHub Desktop.
(define-key *global-map* (kbd "S-b u") #'bookmark-url)
(defcommand bookmark-url ()
"docstring"
(with-result (url (input (mode *minibuffer*)))
(let ((db (sqlite:connect
(truename (probe-file *bookmark-db-path*)))))
(sqlite:execute-non-query
db "insert into bookmarks (url) values (?)" url)
(sqlite:disconnect db))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment