unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: Emacs Development <emacs-devel@gnu.org>
Subject: Why does Gnus article-moving act like a fetch of new news?
Date: Fri, 09 Apr 2021 16:47:10 -0500	[thread overview]
Message-ID: <87lf9rruzl.fsf@red-bean.com> (raw)

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



             reply	other threads:[~2021-04-09 21:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 21:47 Karl Fogel [this message]
2021-04-10  4:11 ` Why does Gnus article-moving act like a fetch of new news? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf9rruzl.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).