From 0ba0c7cd35c8c011ac1329fe41b2d9722089409a Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Fri, 3 Jan 2025 09:07:51 +1100 Subject: [emacs] Add org-protocol-browse-url bookmarklet in firefox: javascript:location.href='org-protocol://browse-url?url='+encodeURIComponent(window.location.href); --- emacs/.emacs.d/lisp/my/my-org.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'emacs/.emacs.d/lisp/my/my-org.el') diff --git a/emacs/.emacs.d/lisp/my/my-org.el b/emacs/.emacs.d/lisp/my/my-org.el index e99352d..5d7203f 100644 --- a/emacs/.emacs.d/lisp/my/my-org.el +++ b/emacs/.emacs.d/lisp/my/my-org.el @@ -1062,6 +1062,11 @@ On success, also move everything from staging to to-dir." (org-protocol-grok (list :url (plist-get eww-data :url)))) +(defun my-org-protocol-browse-url (data) + (when-let ((url (plist-get data :url))) + (browse-url url)) + nil) + ;; org capture rss (defun my-org-rss-xml-create-audio-node (url) (interactive (list (read-string "Feed URL: " -- cgit v1.2.3