info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

on automatic gnus-summary-insert-new-articles after posting


From: Robert Girault
Subject: on automatic gnus-summary-insert-new-articles after posting
Date: Sat, 28 Jul 2018 12:35:02 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]