Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Gnus Users <ding@gnus.org>
Subject: Re: How to setup new nnselect group from init file?
Date: Thu, 05 Nov 2020 18:13:05 -0800	[thread overview]
Message-ID: <87361n8c7i.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <m2v9ek9jz0.fsf@codeisgreat.org> (Pankaj Jangid's message of "Thu, 05 Nov 2020 15:57:47 +0530")

Pankaj Jangid <pankaj@codeisgreat.org> writes:

> I have specified messages for an nnselect group in the configuration in
> ~/.gnus.el. Like this,
>
> (setq gnus-parameters
>       '(("nnselect:emacs"
> 	 (nnselect-specs
> 	  (nnselect-function . gnus-search-run-query)
> 	  (nnselect-args
> 	   (search-query-spec
>             (query . "recipient:emacs-devel@gnu.org"))
> 	   (search-group-spec
>             ("nnimap\\+codeisgreat:INBOX")
>             ))))
> 	("nnselect:postgress"
> 	 (nnselect-specs
> 	  (nnselect-function . gnus-search-run-query)
> 	  (nnselect-args
> 	   (search-query-spec
>             (query . "recipient:pgsql-general@lists.postgresql.org")
> 	    (query . "recipient:pgsql-announce@lists.postgresql.org")
> 	    (query . "recipient:pgsql-novice@lists.postgresql.org")
> 	    (query . "recipient:pgsql-sql@lists.postgresql.org"))

This isn't going to behave the way you want. There can be only one
"query" key, and the query itself will look like
"recipient:pgsql-general@lists.postgresql.org or
recipient:pgsql-announce@lists.postgresql.org or
recipient:pgsql-novice@lists.postgresql.org..."

> (search-group-spec
>             ("nnimap\\+codeisgreat:INBOX")
>             ))))
> 	("nnselect:cron"
> 	 (nnselect-specs
> 	  (nnselect-function . gnus-search-run-query)
> 	  (nnselect-args
> 	   (search-query-spec
>             (query . "from:Cron? Daemon")

You'll probably want quotes around that value "from:\"Cron? Daemon\"".

> 	   (search-group-spec
>             ("nnml:mail.misc")
> 	    ("nnimap\\+otp:INBOX")
>             )))))))
>
> Now how to make these groups visible in the group-buffer? I don't want
> to do it in the UI. I want to set them up in the init file only.
>
> Other groups, like nnimap+... are automatically created once I set it up
> using select method. What is the method for nnselect groups?

I don't believe there's any way to create and subscribe to a group from
your init files. You can certainly set parameters as above, but you'll
need to create the groups from the Group buffer before the parameters
take effect. That would also prevent the above incorrect search queries,
since the group creation would be prompting you directly.


  reply	other threads:[~2020-11-06  2:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 10:27 Pankaj Jangid
2020-11-06  2:13 ` Eric Abrahamsen [this message]
2020-11-06  5:13   ` Pankaj Jangid

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=87361n8c7i.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).