emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-eww.el: Fix org-store-link for eww-mode
@ 2014-11-26 10:12 Marco Wahl
  2014-12-01 13:38 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Wahl @ 2014-11-26 10:12 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1246 bytes --]

From 00500afb8ced99ccaf9334ca183bc572bb6ae29a Mon Sep 17 00:00:00 2001
From: Marco Wahl <marcowahlsoft@gmail.com>
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))))))
 
 \f
 ;; Some auxiliary functions concerning links in eww buffers
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] org-eww.el: Fix org-store-link for eww-mode
  2014-11-26 10:12 [PATCH] org-eww.el: Fix org-store-link for eww-mode Marco Wahl
@ 2014-12-01 13:38 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2014-12-01 13:38 UTC (permalink / raw)
  To: Marco Wahl; +Cc: emacs-orgmode

Hi Marco,

Marco Wahl <marcowahlsoft@gmail.com> writes:

> I'll try to push the patch immediately since it is so small, resides in
> contrib and already helps me.

I see you pushed it already, thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-01 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26 10:12 [PATCH] org-eww.el: Fix org-store-link for eww-mode Marco Wahl
2014-12-01 13:38 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).