Skip to content

Commit

Permalink
avoid crashing in browse server
Browse files Browse the repository at this point in the history
one is currently unable to retrieve a killed group from browse server, unfortunately.
  • Loading branch information
dickmao committed Oct 12, 2019
1 parent ebef50c commit 166bd25
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions nnhackernews.el
Expand Up @@ -461,7 +461,7 @@ If GROUP classification omitted, figure it out."

(deffoo nnhackernews-server-opened (&optional server)
(nnhackernews--normalize-server)
t)
nnhackernews--last-item)

(deffoo nnhackernews-status-message (&optional server)
(nnhackernews--normalize-server)
Expand Down Expand Up @@ -695,7 +695,9 @@ The two hashtables being reconciled are `nnhackernews-location-hashtb' and
(gnus-info-set-marks
info
(append (assq-delete-all 'seen (gnus-info-marks info))
(list `(seen (1 . ,num-headers)))))
(list `(seen (1 . ,num-headers))))
t)
(gnus-info-set-method info (gnus-group-method gnus-newsgroup-name) t)
(gnus-set-info gnus-newsgroup-name info)))
t))

Expand Down Expand Up @@ -1163,6 +1165,18 @@ Optionally provide STATIC-MAX-ITEM and STATIC-NEWSTORIES to prevent querying out
,nnhackernews--group-stories)))
t)

(deffoo nnhackernews-request-newgroups (_date &optional server)
(nnhackernews--normalize-server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(mapc (lambda (group)
(insert (format "%S 0 1 y\n" group)))
`(,nnhackernews--group-ask
,nnhackernews--group-show
,nnhackernews--group-job
,nnhackernews--group-stories))
t))

(defun nnhackernews-sentinel (process event)
"Wipe headers state when PROCESS dies from EVENT."
(unless (string= "open" (substring event 0 4))
Expand Down

0 comments on commit 166bd25

Please sign in to comment.