Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* on automatic gnus-summary-insert-new-articles after posting
@ 2018-07-28 15:35 Robert Girault
  2018-07-28 16:13 ` Eric Abrahamsen
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Robert Girault @ 2018-07-28 15:35 UTC (permalink / raw)
  To: info-gnus-english

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) "\bJ@\203.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-07-30  1:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-28 15:35 on automatic gnus-summary-insert-new-articles after posting Robert Girault
2018-07-28 16:13 ` Eric Abrahamsen
     [not found] ` <mailman.4364.1532794430.1292.info-gnus-english@gnu.org>
2018-07-28 19:54   ` Robert Girault
2018-07-28 20:42 ` Winston
2018-07-28 20:59   ` Eric Abrahamsen
     [not found]   ` <mailman.4365.1532811610.1292.info-gnus-english@gnu.org>
2018-07-29  0:19     ` Robert Girault
2018-07-29  6:52       ` Eric Abrahamsen
2018-07-29  8:07         ` Adam Sjøgren
2018-07-29 16:42           ` Eric Abrahamsen
2018-07-29 18:04             ` Adam Sjøgren
2018-07-29  8:03       ` Adam Sjøgren
2018-07-29 14:37       ` Winston
     [not found]       ` <mailman.4370.1532847194.1292.info-gnus-english@gnu.org>
2018-07-29 16:00         ` Robert Girault
2018-07-29 16:15           ` on continuing from where left off (Was: Re: on automatic gnus-summary-insert-new-articles after posting) Robert Girault
2018-07-29 17:17           ` on automatic gnus-summary-insert-new-articles after posting Eric Abrahamsen
2018-07-30  1:26           ` Robert Girault
     [not found]       ` <mailman.4372.1532851440.1292.info-gnus-english@gnu.org>
2018-07-29 16:04         ` Robert Girault
2018-07-29 18:03           ` Adam Sjøgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).