Commit 581914e4 authored by Ulf Jasper's avatar Ulf Jasper
Browse files

newsticker: Prevent multiple "Could not download..." messages. Fixes bug#19166.

* lisp/net/newst-backend.el (newsticker--get-news-by-url-callback):
Pass correct status to `newsticker--sentinel-work'.
(newsticker--sentinel-work): Use "newsticker--download-error" as
guid in order to prevent multiple "Could not download..."
messages.  Fixes bug#19166.

* lisp/net/newst-treeview.el (newsticker--treeview-item-show): Check
window liveliness before measuring its width.
parent 52fab40c
2014-12-01 Ulf Jasper <ulf.jasper@web.de>
* net/newst-treeview.el (newsticker--treeview-item-show): Check
window liveliness before measuring its width.
* net/newst-backend.el (newsticker--get-news-by-url-callback):
Pass correct status to `newsticker--sentinel-work'.
(newsticker--sentinel-work): Use "newsticker--download-error" as
guid in order to prevent multiple "Could not download..."
messages. Fixes bug#19166.
2014-12-01 Ivan Shmakov <ivan@siamics.net>
* net/eww.el (eww-render): Call `eww-after-render-hook' in the
......
......@@ -745,10 +745,14 @@ from."
(insert result)
;; remove MIME header
(goto-char (point-min))
(search-forward "\n\n")
(search-forward "\n\n" nil t)
(delete-region (point-min) (point))
;; read the rss/atom contents
(newsticker--sentinel-work nil t feed-name "url-retrieve" (current-buffer))
(newsticker--sentinel-work nil
(or (not status)
(not (eq (car status) :error)))
feed-name "url-retrieve"
(current-buffer))
(when status
(let ((status-type (car status))
(status-details (cdr status)))
......@@ -831,7 +835,8 @@ Argument COMMAND is the command of the retrieval process.
Argument BUFFER is the buffer of the retrieval process."
(let ((time (current-time))
(name-symbol (intern feed-name))
(something-was-added nil))
(something-was-added nil)
(ct (current-time)))
;; catch known errors (zombie processes, rubbish-xml etc.
;; if an error occurs the news feed is not updated!
(catch 'oops
......@@ -848,9 +853,10 @@ Argument BUFFER is the buffer of the retrieval process."
(format-time-string "%A, %H:%M")
feed-name event command)
""
(current-time)
ct
'new
0 nil))
0 '((guid nil "newsticker--download-error"))
ct))
(message "%s: Error while retrieving news from %s"
(format-time-string "%A, %H:%M")
feed-name)
......
......@@ -717,7 +717,9 @@ for the button."
(remove-overlays)
(when (and item feed-name-symbol)
(let ((wwidth (1- (window-width (newsticker--treeview-item-window)))))
(let ((wwidth (1- (if (window-live-p (newsticker--treeview-item-window))
(window-width (newsticker--treeview-item-window))
fill-column))))
(if newsticker-use-full-width
(set (make-local-variable 'fill-column) wwidth))
(set (make-local-variable 'fill-column) (min fill-column
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment