From 12fd14b8584175a2f16a44f3acc7f884fe99bc84 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 22 Dec 2012 19:19:26 +0100 Subject: [PATCH] org-w3m.el (org-w3m-store-link): New function * org-w3m.el (org-w3m-store-link): New function. --- lisp/org-w3m.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/org-w3m.el b/lisp/org-w3m.el index bad20036b..b813d501e 100644 --- a/lisp/org-w3m.el +++ b/lisp/org-w3m.el @@ -43,6 +43,17 @@ (require 'org) + +(add-hook 'org-store-link-functions 'org-w3m-store-link) +(defun org-w3m-store-link () + "Store a link to a w3m buffer." + (when (eq major-mode 'w3m-mode) + (org-store-link-props + :type "w3m" + :link w3m-current-url + :url (url-view-url t) + :description (or w3m-current-title w3m-current-url)))) + (defun org-w3m-copy-for-org-mode () "Copy current buffer content or active region with `org-mode' style links. This will encode `link-title' and `link-location' with