unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Why does Gnus article-moving act like a fetch of new news?
@ 2021-04-09 21:47 Karl Fogel
  2021-04-10  4:11 ` Eric Abrahamsen
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Karl Fogel @ 2021-04-09 21:47 UTC (permalink / raw)
  To: Emacs Development

In lisp/gnus/gnus-sum.el, at the end of 
`gnus-summary-move-article', there is this code:

    ;; Re-activate all groups that have been moved to. 
    (with-current-buffer gnus-group-buffer 
      (let ((gnus-group-marked to-groups)) 
	(gnus-group-get-new-news-this-group nil t))) 

I'm no expert in this area of the code, but the above seems to 
conflate two different things:

a) It tells the destination group(s) that a new article has 
arrived, and 
   I guess that in turn "activates" the group?  (My understanding 
   of activation in Gnus is somewhat fuzzy.)

b) It also causes Gnus to run code that's involved in fetching new 
news? 
   At least, it definitely causes `gnus-get-new-news-hook' to be 
   run.

The latter part of (b) surprised me.  My `gnus-get-new-news-hook' 
runs a function that contacts a remote server of mine to check 
something.  I expect Gnus to run that hook only when I actually 
fetch new news -- like when I hit `g' in the Group buffer.  But 
because of (b), that hook is being run every time I move an 
article from one group to another (thus making article-moving very 
slow, of course).  

I expected article-moving to be an entirely local operation, and 
to have nothing to do with fetching new news.  After all, Gnus 
already has the article in question -- it's not "new".

One possibility is that I have wrong expectations about that hook. 
But the hook's documentation says:

  "A hook run just before Gnus checks for new news."

To me, that doesn't mean that the hook would run when I move an 
article from one group to another :-).

So I tentatively think this might indicate a problem in Gnus?  At 
the very least the hook's documentation might need to be updated. 
But it also seems possible that Gnus is failing to make a 
distinction between these two things: 

  "fetch new news from outside sources (usually some server 
  somewhere)"

versus

  "move an article that Gnus already had from one group to 
  another"

Are those two different actions sharing code that perhaps they 
shouldn't share?

I'm not expert in Gnus internals; I hope someone who knows more 
(Lars?)  can comment.

Best regards,
-Karl



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

end of thread, other threads:[~2021-05-05 23:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 21:47 Why does Gnus article-moving act like a fetch of new news? Karl Fogel
2021-04-10  4:11 ` Eric Abrahamsen
2021-04-10  4:58   ` Karl Fogel
2021-04-10  5:29     ` Eric Abrahamsen
2021-04-10  8:29 ` Andreas Schwab
2021-04-10 13:06   ` Stefan Monnier
2021-04-10 22:00     ` Eric Abrahamsen
2021-04-11  6:02       ` Karl Fogel
2021-04-11 16:05 ` Lars Ingebrigtsen
2021-04-12 17:05   ` Eric Abrahamsen
2021-04-12 17:56     ` Karl Fogel
2021-04-12 18:26       ` Eric Abrahamsen
2021-04-13 20:25         ` Karl Fogel
2021-04-13 21:59           ` Eric Abrahamsen
2021-04-14  3:27             ` Karl Fogel
2021-04-25 17:37             ` Lars Ingebrigtsen
2021-05-03 20:52             ` Eric Abrahamsen
2021-05-03 20:53             ` Eric Abrahamsen
2021-05-05 23:21               ` Karl Fogel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).