Browse Source

org-eww.el: Fix org-store-link for eww-mode

* contrib/lisp/org-eww.el (org-eww-store-link): Depending on the Emacs
  version use the appropriate interface to store the url of an
  eww-mode buffer.

This patch fixes the org-store-link feature for eww-mode buffers for
Emacs 25.
Marco Wahl 10 years ago
parent
commit
00500afb8c
1 changed files with 7 additions and 2 deletions
  1. 7 2
      contrib/lisp/org-eww.el

+ 7 - 2
contrib/lisp/org-eww.el

@@ -54,9 +54,14 @@
   (when (eq major-mode 'eww-mode)
     (org-store-link-props
      :type "eww"
-     :link eww-current-url
+     :link (if (< emacs-major-version 25)
+	       eww-current-url
+	     (eww-current-url))
      :url (url-view-url t)
-     :description (or eww-current-title eww-current-url))))
+     :description (if (< emacs-major-version 25)
+		      (or eww-current-title eww-current-url)
+		    (or (plist-get eww-data :title)
+			  (eww-current-url))))))
 
 
 ;; Some auxiliary functions concerning links in eww buffers