Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: how to make gnus print various group lists to stdout
Date: Sat, 18 Nov 2017 10:34:22 -0800	[thread overview]
Message-ID: <87d14fzb9t.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87mv3jjw8r.fsf@passepartout.tim-landscheidt.de>

Tim Landscheidt <tim@tim-landscheidt.de> writes:

> Harry Putnam <reader@newsguy.com> wrote a long time ago:
>
>> […]
>
>>> you get a list of all groups.  If you use:
>
>>> | (dolist (group gnus-newsrc-alist)
>>> |   (if (equal (nth 4 group) '(nntp "news.gmane.org"))
>>> |       (insert (format "%s\n" (car group)))))
>
>>> you get a list of all groups for Gmane.
>
>> This second one looks like it could be edited to make it produce a
>> list from any foreign groups too.
>
>> I'm curious what the `nth 4 group' is all about... is it a reference
>> to level 4?
>
> No, it returns the fifth element of the list referred to by
> group (C-h f nth RET).
>
>> Also I should say that the second example does nothing here.. well it
>> prints `nil' when evaluated with C-x C-e
>
>> I do have gmane in ~/.gnus like this:
>
>>   (setq gnus-select-method '(nntp "news.gmane.org"))
>
> To be clear, my approach to gnus-newsrc-alist and other Gnus
> data structures is entirely example-based: I look at my data
> and see that my Gmane groups have the fifth element set to
> '(nntp "news.gmane.org"), so I search for that.
>
> That works for me because I have gnus-select-method set to
> '(nnml "private"), so Gmane groups are … foreign groups (?)
> which have their fifth element set to '(nntp
> "news.gmane.org").  With gnus-select-method set to Gmane,
> you will need to adapt the filter expression (maybe the
> fifth element is nil for native groups?).

Yes, that's right -- that element is only present for non-native groups.




      reply	other threads:[~2017-11-18 18:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 23:18 Harry Putnam
2017-06-20  1:39 ` Tim Landscheidt
2017-06-20  3:37   ` Harry Putnam
2017-11-18 18:08     ` Tim Landscheidt
2017-11-18 18:34       ` Eric Abrahamsen [this message]

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=87d14fzb9t.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).