Gnus development mailing list
 help / color / mirror / Atom feed
* Re: Why asterisks in nnmail-split-fancy rule?
       [not found]                       ` <bbgfen$fii$1@quimby.gnus.org>
@ 2003-06-03 14:07                         ` Kai Großjohann
  2003-06-15 19:15                           ` Ted Zlatanov
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Großjohann @ 2003-06-03 14:07 UTC (permalink / raw)


Ted Zlatanov <tzz@lifelogs.com> writes:

> Here's a patch that will introduce a new variable,
> nnmail-split-expert-regexes (boolean, nil by default).

I've renamed the variable and changed the implementation, as
mentioned on gnu.emacs.gnus.  WDYT?

It's untested :-\
-- 
This line is not blank.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why asterisks in nnmail-split-fancy rule?
  2003-06-03 14:07                         ` Kai Großjohann
@ 2003-06-15 19:15                           ` Ted Zlatanov
  0 siblings, 0 replies; 3+ messages in thread
From: Ted Zlatanov @ 2003-06-15 19:15 UTC (permalink / raw)


On Tue, 03 Jun 2003, kai.grossjohann@gmx.net wrote:
> Ted Zlatanov <tzz@lifelogs.com> writes:
> 
>> Here's a patch that will introduce a new variable,
>> nnmail-split-expert-regexes (boolean, nil by default).
> 
> I've renamed the variable and changed the implementation, as
> mentioned on gnu.emacs.gnus.  WDYT?
> 
> It's untested :-\

It looks great, thanks for getting it done!

Ted



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why asterisks in nnmail-split-fancy rule?
       [not found]                     ` <4nk7c55sn3.fsf@lockgroove.bwh.harvard.edu>
@ 2003-06-02 20:42                       ` Ted Zlatanov
       [not found]                       ` <bbgfen$fii$1@quimby.gnus.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Ted Zlatanov @ 2003-06-02 20:42 UTC (permalink / raw)
  Cc: Ding Mailing List

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

Here's a patch that will introduce a new variable,
nnmail-split-expert-regexes (boolean, nil by default).

When nnmail-split-expert-regexes is set, every pattern to match in
nnmail-split-fancy and nnimap-split-fancy (which uses the
nnmail-split-fancy functionality) will be surrounded by ".*" front and
back.  I can add a nnimap-split-expert-regexes variable if anyone is
interested.  The effect is to make life easier for those of us who are
used to matching against the full line, not just inside words as
defined by the current syntax table.

Please comment, thanks...

Ted


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnmail-split-expert-regexes.patch --]
[-- Type: text/x-patch, Size: 1176 bytes --]

Index: nnmail.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v
retrieving revision 6.74
diff -a -u -r6.74 nnmail.el
--- nnmail.el	17 Apr 2003 19:01:45 -0000	6.74
+++ nnmail.el	2 Jun 2003 20:52:35 -0000
@@ -441,6 +441,14 @@
   ;; Sigh!
   :type 'sexp)
 
+(defcustom nnmail-split-expert-regexes nil
+  "Set this if you want your split patterns to be against the full
+line, not just a word as defined by the syntax table (if this is nil,
+you can achieve the same effect by surrounding your pattern with '.*'
+strings)."
+  :group ''nnmail-split
+  :type 'boolean)
+
 (defcustom nnmail-split-abbrev-alist
   '((any . "from\\|to\\|cc\\|sender\\|apparently-to\\|resent-from\\|resent-to\\|resent-cc")
     (mail . "mailer-daemon\\|postmaster\\|uucp")
@@ -1346,6 +1354,9 @@
 	     partial-rear  regexp)
 	(if (symbolp value)
 	    (setq value (cdr (assq value nnmail-split-abbrev-alist))))
+	(when (and nnmail-split-expert-regexes
+		   (stringp value))
+	  (setq value (format ".*%s.*" value)))
 	(if (and (>= (length value) 2)
 		 (string= ".*" (substring value 0 2)))
 	    (setq value (substring value 2)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-15 19:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <hddk7c8vpwa.fsf@bacchus.pvv.ntnu.no>
     [not found] ` <84znl46967.fsf@lucy.is.informatik.uni-duisburg.de>
     [not found]   ` <87ptm0edoa.fsf@mail.paradoxical.net>
     [not found]     ` <84vfvso03d.fsf@lucy.is.informatik.uni-duisburg.de>
     [not found]       ` <4nbrxk858v.fsf@lockgroove.bwh.harvard.edu>
     [not found]         ` <84he7b2yk9.fsf@lucy.is.informatik.uni-duisburg.de>
     [not found]           ` <4nsmqv5nv8.fsf@lockgroove.bwh.harvard.edu>
     [not found]             ` <84d6hzdw4u.fsf@lucy.is.informatik.uni-duisburg.de>
     [not found]               ` <4nof1i6duy.fsf@lockgroove.bwh.harvard.edu>
     [not found]                 ` <848yslraqf.fsf@lucy.is.informatik.uni-duisburg.de>
     [not found]                   ` <u4r39li99.fsf@att.net>
     [not found]                     ` <4nk7c55sn3.fsf@lockgroove.bwh.harvard.edu>
2003-06-02 20:42                       ` Why asterisks in nnmail-split-fancy rule? Ted Zlatanov
     [not found]                       ` <bbgfen$fii$1@quimby.gnus.org>
2003-06-03 14:07                         ` Kai Großjohann
2003-06-15 19:15                           ` Ted Zlatanov

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