From: Ulf Jasper Date: Wed, 26 Nov 2014 18:29:34 +0000 (+0100) Subject: newsticker: Take care of UIDs when adding elements to cache. X-Git-Tag: emacs-25.0.90~2635^2~316 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=549a1bae4a54c56c4c8d212f1441ac44aac89a4b;p=emacs.git newsticker: Take care of UIDs when adding elements to cache. * lisp/net/newst-backend.el (newsticker--parse-generic-items): Take care of UIDs when adding elements to cache. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7567c6323c8..ee473902376 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-26 Ulf Jasper + + * net/newst-backend.el (newsticker--parse-generic-items): Take + care of UIDs when adding elements to cache. + 2014-11-26 Alan Mackenzie Remove spurious reference to symbol category_properties. diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index 7be07c74fcb..41f8b8440bd 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -1579,11 +1579,16 @@ argument, which is one of the items in ITEMLIST." ;; item was not there (setq item-new-p t) (setq something-was-added t)) - (setq newsticker--cache - (newsticker--cache-add - newsticker--cache (intern name) title desc link - time age1 position (funcall extra-fn node) - time age2)) + (let ((extra-elements-with-guid (funcall extra-fn node))) + (unless (assoc 'guid extra-elements-with-guid) + (setq extra-elements-with-guid + (cons `(guid nil ,(funcall guid-fn node)) + extra-elements-with-guid))) + (setq newsticker--cache + (newsticker--cache-add + newsticker--cache (intern name) title desc link + time age1 position extra-elements-with-guid + time age2))) (when item-new-p (let ((item (newsticker--cache-contains newsticker--cache (intern name) title