From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: gnus Split Rules to SIEVE Date: Mon, 21 Sep 2015 01:55:43 +0200 Message-ID: <87bncw3atc.fsf@debian.uxu> References: <3d1b340d392ba0a0f6a044c4b5bd0f35@esben-stien.name> <9b40dd334b4abba6de568b9c80e0679b@esben-stien.name> <20150920182624.7282.2800CCB1@ahiker.mooo.com> <87h9mo3f7a.fsf@debian.uxu> <20150920223506.9499.1BF89E81@ahiker.mooo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442792872 12929 80.91.229.3 (20 Sep 2015 23:47:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Sep 2015 23:47:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 21 01:47:38 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZdoKW-0002ja-9G for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Sep 2015 01:47:36 +0200 Original-Received: from localhost ([::1]:54254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdoKU-0001Bv-WB for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Sep 2015 19:47:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdoKL-0001Bl-JN for help-gnu-emacs@gnu.org; Sun, 20 Sep 2015 19:47:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdoKG-0005Ga-O0 for help-gnu-emacs@gnu.org; Sun, 20 Sep 2015 19:47:25 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:52509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdoKG-0005GR-Hl for help-gnu-emacs@gnu.org; Sun, 20 Sep 2015 19:47:20 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZdoKF-0002JL-16 for help-gnu-emacs@gnu.org; Mon, 21 Sep 2015 01:47:19 +0200 Original-Received: from nl106-137-244.student.uu.se ([130.243.137.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Sep 2015 01:47:19 +0200 Original-Received: from embe8573 by nl106-137-244.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Sep 2015 01:47:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-244.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:JlBT5IuyNqWwdgNyD8XTt6SvQDM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107260 Archived-At: Ian Zimmerman writes: > (Apologies in advance if long lines in Emanuel's > code mess up a reader's display.) ?! :) > It is only a challenge if you write your gnus rules > like this, relying on regexps operators instead of > doing it the natural Lisp way. Roughly like this: > >> (setq nnmail-split-methods '(("spam-ooa" >> "^X-Spam-Flag: YES") ("spam-ooa" "^Subject: >> lists.bofh.it mailing list memberships reminder") >> ("spam-ooa" "^Subject: Happy Birthday From >> Facebook") What about this line: ("zsh" "^\\(Cc\\|\\(Resent-\\)?To\\):.*zsh-\\(announce\\|workers\\|users\\)@zsh\.org.*") The regexps are called for and this will be very complicated to translate to any other syntax, regardless if that other syntax supports regexps or not. (By the way, why don't the OP publish all or a couple of his Gnus splitting rules so we can reason about the real thing?) > I believe this style would be easy to translate. > > (Btw., you can match regexps with Sieve too, at > least with a decent implementation which includes > the requisite plugin. Dovecot does.) Help that is easy to offer should be offered the OP. But: even if the help is easy to offer, which it isn't, and even if the help is offered, which hasn't happened yet, it is still better to write the SIEVE point blank. It might not be the Lisp way (whatever that is) but it is the intelligent and enjoyable way that will use a reasonable amount of time to solve a problem the way it was intended to be solved. Don't you think? -- underground experts united http://user.it.uu.se/~embe8573