From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: [PATCH] org-eww.el: Fix org-store-link for eww-mode Date: Wed, 26 Nov 2014 11:12:36 +0100 Message-ID: <84d28a2ru3.fsf@tm6592.fritz.box> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtZam-00014J-N1 for emacs-orgmode@gnu.org; Wed, 26 Nov 2014 05:13:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtZae-0000zX-L5 for emacs-orgmode@gnu.org; Wed, 26 Nov 2014 05:13:00 -0500 Received: from plane.gmane.org ([80.91.229.3]:43581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtZae-0000yr-Dt for emacs-orgmode@gnu.org; Wed, 26 Nov 2014 05:12:52 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XtZaZ-0003Dd-V5 for emacs-orgmode@gnu.org; Wed, 26 Nov 2014 11:12:47 +0100 Received: from stgt-5f717445.pool.mediaways.net ([95.113.116.69]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Nov 2014 11:12:47 +0100 Received: from marcowahlsoft by stgt-5f717445.pool.mediaways.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 Nov 2014 11:12:47 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hello! Find a small fix to keep up with the eww evolvement. I'll try to push the patch immediately since it is so small, resides in contrib and already helps me. But of course any comments are welcome, as always, thanks. -- http://www.wahlzone.de GPG: 0x49010A040A3AE6F2 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org-eww.el-Fix-org-store-link-for-eww-mode.patch Content-Description: patch >From 00500afb8ced99ccaf9334ca183bc572bb6ae29a Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Wed, 26 Nov 2014 10:38:43 +0100 Subject: [PATCH] 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. --- contrib/lisp/org-eww.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/org-eww.el b/contrib/lisp/org-eww.el index 26a1e09..08dac11 100644 --- a/contrib/lisp/org-eww.el +++ b/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 -- 2.1.3 --=-=-=--