Gnus development mailing list
 help / color / mirror / Atom feed
* nnmail-split-fancy-match-partial-words
@ 2006-03-03  9:45 Fabrice Popineau
  2006-03-03 11:13 ` nnmail-split-fancy-match-partial-words Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Fabrice Popineau @ 2006-03-03  9:45 UTC (permalink / raw)



Hi,

Id' like to draw attention on the following point. I have a rather long
nnmail-split-fancy list. I had this split rule :

("subject" "\\[ce\\]" foo.ce)

that was not working and I had much trouble in finding why. In fact,
that is because of interaction between
nnmail-split-fancy-match-partial-words and the status of [] that do not
belong to words in the default syntax table. While I'd like to retain
the default nil value for matching partial words, I'd expect also that
any regexp I put in the fancy split rule is taken for what it is.

I ended up in crudely patching nnmail-split-it in nnmail.el but that's
defintely not a clean answer to the problem. Maybe that's a limitation
of regexp/syntax tables after all.

BTW, all occurences of set-file-modes should be replaced with
gnus-set-file-modes for windows users'sake (at least under xemacs).

I'm using xemacs 21.5.b21 under native windows for what it worth.

--- nnmail.el	2006-02-01 13:51:57.000000000 +0100
+++ nnmail.el	2006-03-03 10:15:01.000000000 +0100
@@ -1436,7 +1436,10 @@
 		 (string= ".*" (substring value -2)))
 	    (setq value (substring value 0 -2)
 		  partial-rear ""))
-	(when nnmail-split-fancy-match-partial-words
+	(when 
+	    (or nnmail-split-fancy-match-partial-words
+		;; FP: if there are backets in the sequence, don't surround with <..>
+		(string-match "\\[.*\\]" value))
 	  (setq partial-front ""
 		partial-rear ""))
 	(setq regexp (concat "^\\(\\("
@@ -1907,7 +1904,7 @@
   (let ((coding-system-for-write nnmail-file-coding-system)
 	(file-name-coding-system nnmail-pathname-coding-system))
     (write-region start end filename append visit lockname)
-    (set-file-modes filename nnmail-default-file-modes)))
+    (gnus-set-file-modes filename nnmail-default-file-modes)))
 
 ;;;
 ;;; Status functions

Best regards,

-- 
Fabrice Popineau
------------------------
e-mail:       Fabrice.Popineau@supelec.fr  |  The difference between theory 
voice-mail:   +33 (0) 387764715            |  and practice, is that
surface-mail: Supelec, 2 rue E. Belin,     |  theoretically,
	      F-57070 Metz 	           |  there is no difference !




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

end of thread, other threads:[~2006-03-10  2:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-03  9:45 nnmail-split-fancy-match-partial-words Fabrice Popineau
2006-03-03 11:13 ` nnmail-split-fancy-match-partial-words Katsumi Yamaoka
2006-03-03 14:38   ` nnmail-split-fancy-match-partial-words Reiner Steib
2006-03-05 20:39     ` nnmail-split-fancy-match-partial-words Fabrice Popineau
2006-03-05 21:50       ` nnmail-split-fancy-match-partial-words Reiner Steib
2006-03-06  4:00         ` nnmail-split-fancy-match-partial-words Katsumi Yamaoka
2006-03-06  8:19           ` nnmail-split-fancy-match-partial-words Fabrice Popineau
2006-03-07  9:55           ` nnmail-split-fancy-match-partial-words Katsumi Yamaoka
2006-03-08  9:06             ` nnmail-split-fancy-match-partial-words Katsumi Yamaoka
2006-03-09 15:41               ` nnmail-split-fancy-match-partial-words Reiner Steib
2006-03-10  2:02                 ` nnmail-split-fancy-match-partial-words Katsumi Yamaoka
2006-03-05 20:43     ` nnmail-split-fancy-match-partial-words Fabrice Popineau
2006-03-06 15:45       ` set-file-modes (XEmacs on w32) (was: nnmail-split-fancy-match-partial-words) Reiner Steib
2006-03-09 20:50         ` set-file-modes (XEmacs on w32) Reiner Steib

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