Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: nnvirtual groups and article warping
Date: Thu, 03 Mar 2022 11:38:01 -0800	[thread overview]
Message-ID: <8735jyygh2.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87czj3x9gh.fsf@ucl.ac.uk>

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Hello all,
>
> I use virtual groups to collect emails from a number of groups (all
> nnml).  When reading the virtual group, there are times where I would
> like to jump to the originating group.  In groups that are the result of
> searches, I can do this with A W (gnus-warp-to-article).  Is the same
> functionality available with an nnvirtual group?  (I haven't been able
> to find it, if it exists.)

It doesn't exist, but it wouldn't be too hard to write.

Basically, nnvirtual would have to have a function called
`nnvirtual-warp-to-article', which did something like:

(let* ((gnus-override-method nil)
       (gnus-newsgroup-name
	(gnus-group-prefixed-name
	 (car (nnvirtual-map-article
	       (gnus-summary-article-number)))))
       (gnus-command-method
	(gnus-find-method-for-group gnus-newsgroup-name)))
  (when (gnus-check-backend-function
	 'warp-to-article (car gnus-command-method))
    (funcall (gnus-get-function gnus-command-method 'warp-to-article))))

The weird thing, poking into the code, is that no backends seem to
implement *-warp-to-article, except nnselect. Doesn't that seem weird?

So this function would instead have to do pretty much what
nnselect-warp-to-article does, namely:

(deffoo nnvirtual-warp-to-article ()
  (let* ((cur (if (> (gnus-summary-article-number) 0)
		  (gnus-summary-article-number)
		(error "Can't warp to a pseudo-article")))
	 (group-art (nnvirtual-map-article cur)))
    (gnus-summary-read-group-1 (car group-art) t t  nil
                               nil (list (cdr group-art)))))

Does that work?




  reply	other threads:[~2022-03-03 19:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 16:54 Eric S Fraga
2022-03-03 19:38 ` Eric Abrahamsen [this message]
2022-03-03 23:15   ` Andrew Cohen
2022-03-04 17:28     ` Eric Abrahamsen
2022-03-05  3:02       ` Andrew Cohen
2022-03-05  6:49         ` Andrew Cohen
2022-03-06 12:49     ` Eric S Fraga
2022-03-06 13:04       ` Andrew Cohen
2022-03-07 15:35         ` Eric S Fraga
2022-03-07 23:07           ` Andrew Cohen
2022-03-08  8:59             ` Eric S Fraga
2022-03-06 13:11       ` Andrew Cohen
2022-03-04  8:01   ` Eric S Fraga
2022-03-04 15:45     ` Eric Abrahamsen
2022-03-04 15:56       ` Eric S Fraga
2022-03-04 17:16         ` Eric Abrahamsen

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

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

  git send-email \
    --in-reply-to=8735jyygh2.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.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.
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).