~brettgilio/org-webring

30f8868c40ba35b068e68079dc4ffd359a05a7a1 — Jamie Beardslee 20 days ago dc96fa2
Fix missing link to article in atom feeds

* --source-link renamed to --get-link, removed TYPE argument
* --article-instance now uses --get-link so that it may find the link
  from an atom feed

Co-authored-by: Brett Gilio <brettg@gnu.org>
1 files changed, 9 insertions(+), 9 deletions(-)

M org-webring.el
M org-webring.el => org-webring.el +9 -9
@@ 11,7 11,7 @@
;; Co-author: Jamie Beardslee <jdb@jamzattack.xyz>
;; Co-author: Amin Bandali <bandali@gnu.org>
;; Co-author: Ivan Sokolov <ivan-p-sokolov@ya.ru>
;; Version: 1.5
;; Version: 1.6

;; Repository: https://git.sr.ht/~brettgilio/org-webring
;; Tracker: https://todo.sr.ht/~brettgilio/org-webring


@@ 79,7 79,7 @@
  "Used to track the originating directory of asset files.")

(defconst org-webring-version
  "1.5"
  "1.6"
  "The current version of org-webring.")

(defcustom org-webring-items-total 3


@@ 190,11 190,11 @@ If TYPE is `rss', return the `channel' tag, otherwise return the
	    (assq 'rss data))
    (assq 'feed data)))

(defun org-webring--source-link (feed type)
  "Return the source link of FEED."
  (if (eq type 'rss)
      (org-webring--feed-text-prop feed 'link)
    (cdaadr (org-webring--xml-get-child feed 'link))))
(defun org-webring--get-link (object)
  "Return the source link of OBJECT.
OBJECT may be either the full feed or an item thereof."
  (or (org-webring--feed-text-prop object 'link)
      (cdaadr (org-webring--xml-get-child object 'link))))

(defun org-webring--get-items-from-url (url)
  "Create a list of items contained in the feed at URL.


@@ 205,7 205,7 @@ Produces the value set by `org-webring-items-per-source'."
	    (xml-parse-region)))
	 (type (org-webring--type url-content))
	 (feed (org-webring--feed-parse url-content type))
	 (source-link (org-webring--source-link feed type))
	 (source-link (org-webring--get-link feed))
	 (source-title (org-webring--feed-text-prop feed 'title)))
    (seq-map (lambda (item)
	       `(item                   ; tag


@@ 263,7 263,7 @@ was introduced in Emacs 27) isn't available."
    `(div :class "org-webring-article"
	  (h4 :class "org-webring-article-title"
	      (a :href
		 ,(org-webring--feed-text-prop item 'link)
		 ,(org-webring--get-link item)
		 :target "_blank"
		 ,(org-webring--feed-text-prop item 'title)))
	  (p :class "org-webring-article-summary"