Gnus development mailing list
 help / color / mirror / Atom feed
From: Harry Putnam <reader@newsguy.com>
To: ding@gnus.org
Subject: Re: how to make gnus print various group lists to stdout
Date: Mon, 19 Jun 2017 23:37:40 -0400	[thread overview]
Message-ID: <86injr72ij.fsf@local.lan> (raw)
In-Reply-To: <87h8zb5tfa.fsf@passepartout.tim-landscheidt.de>

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

>> Can anyone offer some ways to get at that kind of information other
>> than viewing it inside emacs, and creating a file from the buffer?
>
> You can parse ~/.newsrc.eld with Perl, and apparently there
> is even a CPAN module for reading Lisp (Data::SExpression),
> but I would rather bite the bullet and learn some (basic)
> Emacs Lisp.  For example, after starting Gnus, if you switch
> to an empty buffer and evaluate:

First, thanks for the great input.

That was exactly the point of my post.. to do it with gnus.. the
But make gnus write the info to files or stdout.

`other' tools come in after getting the basic group info from gnus.

I've been parsing .newsrc.eld or trying to, but I found a file that
shows all the agentized groups in a simpler setting:

News/agent/lib/categories.  Since the only category I use is `true'
and make it the default, then that is all that is in there so fairly
easy to pull the group names out of there with perl.

Still need access to other of gnus group lists though, which is in
.newsrc.eld.


> | (dolist (group gnus-newsrc-alist)
> |   (insert (format "%s\n" (car group))))

Yup... I see, and is exactly what I was asking about.

> 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?

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"))

Oh, and how would I go about making emacs/gnus send any list information
to stdout or to file?






  reply	other threads:[~2017-06-20  3:37 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 [this message]
2017-11-18 18:08     ` Tim Landscheidt
2017-11-18 18:34       ` 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=86injr72ij.fsf@local.lan \
    --to=reader@newsguy.com \
    --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).