Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Tommy Kelly <tommy.kelly@verilab.com>
To: info-gnus-english@gnu.org
Subject: nnimap-split-fancy
Date: Thu, 16 Dec 2010 19:10:49 -0600	[thread overview]
Message-ID: <m2hbedurty.fsf@verilab.com> (raw)

I may have to propose info "6.3.6 Fancy Mail Splitting" for the winner
of "Most Difficult To Follow Instructions 2010", but let's see. As a
start, does  the following make sense? The intent is to put emails from
domain1.com and domain2.com into, respectively, groups
emails-from-domain1 and emails-from-domain2, and to leave all others in
INBOX. 

(setq gnus-secondary-select-methods
      '(
	(nnimap "work"
		(nnimap-address "imap.gmail.com")
 	 	(nnimap-stream ssl)
		(nnimap-server-port 993)
		(nnimap-inbox "INBOX")
		(nnimap-split-methods 'nnmail-split-fancy)
		(nnmail-split-fancy 
		 ( |
		   ("from" ".*domain1\\.com" "emails-from-domain1)
		   ("from" ".*domain2\\.com" "emails-from-domain2)
		   "INBOX" "")
		  )
		)
      )

If it does make sense, well it doesn't work.

How about an example from someone who groks this stuff. What would the
fancy splitting look like to put into group "jabba-hates-luke", all
messages from jabba@thehutt.com with "Luke is annoying" in the subject? 

And then, other questions about the info:

* "This variable has the format of a split. A split is ..."

Is a "split" a well-defined lisp thing? If not, isn't that definition
nothing more than the statement: "This variable has the format of a
possibly recursive thingy"?  

* "Here are the possible split syntaxes: group ..."

This is very confusing given that "junk" and "nil" are also listed as
options later. It makes it look like group is another symbol that can be
provided as a split. But then:


* "junk  If the split is the symbol junk ..." 
and
* "nil   If the split is nil it is ignored"

What would it look like for the split to *be* the symbol junk?
And an example of a nil split would be helpful.


* "(! func split)  If the split is a list, and the first element is !,
  then split will be processed, and func will be called as a function
  with the result of split as argument..."

Now I'm not showing italics, and so in the original (with-italics) the difference
between *the* split, and its internal split (i.e. third item in the
list) is clearer. But it would be 
a helluva lot easier to read if "split" wasn't being used in two
different senses.

Also, what is "the result of split"? Is it a split? A group name? What?

Note -- I am not au fait with lisp, so maybe the above are all stupid
newb questions, but I'm kinda guessing not. 

thanks,
Tommy

             reply	other threads:[~2010-12-17  1:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-17  1:10 Tommy Kelly [this message]
     [not found] <mailman.5.1292548275.31723.info-gnus-english@gnu.org>
2010-12-17  9:38 ` nnimap-split-fancy Adam Sjøgren
2010-12-17 10:36   ` nnimap-split-fancy Richard Riley
2010-12-17 15:09   ` nnimap-split-fancy Tommy Kelly
2010-12-18 19:12     ` nnimap-split-fancy Eric S Fraga
     [not found]   ` <mailman.4.1292598585.3076.info-gnus-english@gnu.org>
2010-12-17 21:18     ` nnimap-split-fancy Adam Sjøgren

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=m2hbedurty.fsf@verilab.com \
    --to=tommy.kelly@verilab.com \
    --cc=info-gnus-english@gnu.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).