From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87818 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: how to make gnus print various group lists to stdout Date: Sat, 18 Nov 2017 10:34:22 -0800 Message-ID: <87d14fzb9t.fsf@ericabrahamsen.net> References: <86vanr7ei7.fsf@local.lan> <87h8zb5tfa.fsf@passepartout.tim-landscheidt.de> <86injr72ij.fsf@local.lan> <87mv3jjw8r.fsf@passepartout.tim-landscheidt.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1511030199 16927 195.159.176.226 (18 Nov 2017 18:36:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Nov 2017 18:36:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+m36032@lists.math.uh.edu Sat Nov 18 19:36:35 2017 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048035.atla03.us.yomura.com ([107.189.48.35]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eG7yi-0003z2-JZ for ding-account@gmane.org; Sat, 18 Nov 2017 19:36:32 +0100 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048035.atla03.us.yomura.com (Halon) with ESMTPS id 69034ff3-cc8f-11e7-8154-b499baabecb2; Sat, 18 Nov 2017 18:36:37 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.89) (envelope-from ) id 1eG7yX-0005Ur-Na; Sat, 18 Nov 2017 12:36:21 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eG7yV-0005UL-A2 for ding@lists.math.uh.edu; Sat, 18 Nov 2017 12:36:19 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.89) (envelope-from ) id 1eG7yT-0004p5-9W for ding@lists.math.uh.edu; Sat, 18 Nov 2017 12:36:18 -0600 Original-Received: from [195.159.176.226] (helo=blaine.gmane.org) by quimby.gnus.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1eG7yR-0004HB-Ud for ding@gnus.org; Sat, 18 Nov 2017 19:36:15 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eG7yH-0002UW-Bs for ding@gnus.org; Sat, 18 Nov 2017 19:36:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:lU7clIGIOJFnR0F7QM0Lr0+qmqM= List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87818 Archived-At: Tim Landscheidt writes: > Harry Putnam 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.