delete article buffers after rescore #17
|
@ -551,14 +551,17 @@ Originally written by Paul Issartel."
|
||||||
"Add to HASHTB the pair consisting of entry E's name to its FIELD."
|
"Add to HASHTB the pair consisting of entry E's name to its FIELD."
|
||||||
(nnhackernews--sethash (plist-get e :id) (plist-get e field) hashtb))
|
(nnhackernews--sethash (plist-get e :id) (plist-get e field) hashtb))
|
||||||
|
|
||||||
(defsubst nnhackernews--summary-exit ()
|
(defun nnhackernews--summary-exit (group)
|
||||||
"Call `gnus-summary-exit' without the hackery."
|
"Call `gnus-summary-exit' for GROUP without the hackery."
|
||||||
(remove-function (symbol-function 'gnus-summary-exit)
|
(remove-function (symbol-function 'gnus-summary-exit)
|
||||||
(symbol-function 'nnhackernews--score-pending))
|
(symbol-function 'nnhackernews--score-pending))
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(progn
|
(let ((summary-buffer-name (gnus-summary-buffer-name group)))
|
||||||
|
(with-current-buffer summary-buffer-name
|
||||||
(gnus-summary-exit t t)
|
(gnus-summary-exit t t)
|
||||||
(gnus-kill-buffer gnus-summary-buffer))
|
(gnus-kill-buffer gnus-article-buffer)
|
||||||
|
(gnus-kill-buffer gnus-original-article-buffer))
|
||||||
|
(gnus-kill-buffer (get-buffer summary-buffer-name)))
|
||||||
(add-function :after (symbol-function 'gnus-summary-exit)
|
(add-function :after (symbol-function 'gnus-summary-exit)
|
||||||
(symbol-function 'nnhackernews--score-pending))))
|
(symbol-function 'nnhackernews--score-pending))))
|
||||||
|
|
||||||
|
@ -609,8 +612,7 @@ FORCE is generally t unless coming from `nnhackernews--score-pending'."
|
||||||
group)
|
group)
|
||||||
(nnhackernews--with-mutex nnhackernews--mutex-display-article
|
(nnhackernews--with-mutex nnhackernews--mutex-display-article
|
||||||
(gnus-summary-read-group group nil t)
|
(gnus-summary-read-group group nil t)
|
||||||
(with-current-buffer (gnus-summary-buffer-name group)
|
(nnhackernews--summary-exit group))))))))))
|
||||||
(nnhackernews--summary-exit)))))))))))
|
|
||||||
|
|
||||||
(defalias 'nnhackernews--score-pending
|
(defalias 'nnhackernews--score-pending
|
||||||
(lambda (&rest _args)
|
(lambda (&rest _args)
|
||||||
|
@ -656,8 +658,8 @@ Otherwise *Group* buffer annoyingly overrepresents unread."
|
||||||
(> (gnus-summary-article-score article) 0))))
|
(> (gnus-summary-article-score article) 0))))
|
||||||
(gnus-message 7 "nnhackernews--mark-scored-as-read: %s (%s %s)"
|
(gnus-message 7 "nnhackernews--mark-scored-as-read: %s (%s %s)"
|
||||||
(plist-get plst :title) group article)
|
(plist-get plst :title) group article)
|
||||||
(gnus-summary-mark-as-read article)))
|
(gnus-summary-mark-as-read article))))
|
||||||
(nnhackernews--summary-exit)))))))))
|
(nnhackernews--summary-exit gnus-newsgroup-name))))))))
|
||||||
|
|
||||||
(deffoo nnhackernews-request-group-scan (group &optional server info)
|
(deffoo nnhackernews-request-group-scan (group &optional server info)
|
||||||
"M-g from *Group* calls this."
|
"M-g from *Group* calls this."
|
||||||
|
|
Loading…
Reference in New Issue