Robert Girault
2018-07-28 15:35:02 UTC
How can I
gnus-summary-insert-new-articles
automatically after posting? I'd like to see my articles right away in
the thread without having to ``/ N'' every time I post.
I tried
(add-hook 'message-sent-hook 'gnus-summary-insert-new-articles)
but that blows a void-variable perm. Investigating further, I see the
problem happens deep into gnus-thread-loop-p. I cloned
gnus-summary-insert-new-articles
to take an argument, the group name. Here's the attempt:
--8<---------------cut here---------------start------------->8---
(defun gnus-summary-insert-new-articles-arg (g)
"Insert all new articles in this group."
(interactive)
(let ((old (sort (mapcar 'car gnus-newsgroup-data) '<))
(old-high gnus-newsgroup-highest)
(nnmail-fetched-sources (list t))
(new-active (gnus-activate-group g 'scan))
i new)
(unless new-active
(error "Couldn't fetch new data"))
(setq gnus-newsgroup-active (gnus-copy-sequence new-active))
(setq i (cdr gnus-newsgroup-active)
gnus-newsgroup-highest i)
(while (> i old-high)
(push i new)
(decf i))
(if (not new)
(message "No gnus is bad news")
(gnus-summary-insert-articles new)
(setq gnus-newsgroup-unreads
(gnus-sorted-nunion gnus-newsgroup-unreads new))
(gnus-summary-limit (gnus-sorted-nunion old new))))
(gnus-summary-position-point))
--8<---------------cut here---------------end--------------->8---
Now, executing
(gnus-summary-insert-new-articles-arg "alt.test")
also blows the (void-variable perm) problem.
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-variable perm)
#[(refs) "J@\203.
gnus-summary-insert-new-articles
automatically after posting? I'd like to see my articles right away in
the thread without having to ``/ N'' every time I post.
I tried
(add-hook 'message-sent-hook 'gnus-summary-insert-new-articles)
but that blows a void-variable perm. Investigating further, I see the
problem happens deep into gnus-thread-loop-p. I cloned
gnus-summary-insert-new-articles
to take an argument, the group name. Here's the attempt:
--8<---------------cut here---------------start------------->8---
(defun gnus-summary-insert-new-articles-arg (g)
"Insert all new articles in this group."
(interactive)
(let ((old (sort (mapcar 'car gnus-newsgroup-data) '<))
(old-high gnus-newsgroup-highest)
(nnmail-fetched-sources (list t))
(new-active (gnus-activate-group g 'scan))
i new)
(unless new-active
(error "Couldn't fetch new data"))
(setq gnus-newsgroup-active (gnus-copy-sequence new-active))
(setq i (cdr gnus-newsgroup-active)
gnus-newsgroup-highest i)
(while (> i old-high)
(push i new)
(decf i))
(if (not new)
(message "No gnus is bad news")
(gnus-summary-insert-articles new)
(setq gnus-newsgroup-unreads
(gnus-sorted-nunion gnus-newsgroup-unreads new))
(gnus-summary-limit (gnus-sorted-nunion old new))))
(gnus-summary-position-point))
--8<---------------cut here---------------end--------------->8---
Now, executing
(gnus-summary-insert-new-articles-arg "alt.test")
also blows the (void-variable perm) problem.
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-variable perm)
#[(refs) "J@\203.