diff options
author | Bastien Guerry <bzg@gnu.org> | 2013-11-12 14:06:26 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@gnu.org> | 2013-11-12 14:06:26 +0100 |
commit | 271672fad74cdbc9065d23d6e6cee1b8540f571b (patch) | |
tree | d322b956ec0e74ee33b22354ef00839b23b1618d /lisp/org/org-w3m.el | |
parent | f201cf3a8143b0b34b07769fc7d73dd14761b87b (diff) | |
download | emacs-271672fad74cdbc9065d23d6e6cee1b8540f571b.tar.gz |
Merge Org version 8.2.3a.
Diffstat (limited to 'lisp/org/org-w3m.el')
-rw-r--r-- | lisp/org/org-w3m.el | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lisp/org/org-w3m.el b/lisp/org/org-w3m.el index e1cc99627ea..a2f29165e8d 100644 --- a/lisp/org/org-w3m.el +++ b/lisp/org/org-w3m.el @@ -8,12 +8,12 @@ ;; ;; This file is part of GNU Emacs. ;; -;; GNU Emacs is free software: you can redistribute it and/or modify +;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; GNU Emacs is distributed in the hope that it will be useful, +;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. @@ -43,6 +43,19 @@ (require 'org) +(defvar w3m-current-url) +(defvar w3m-current-title) + +(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 |