From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62143 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: nnmail-split-fancy-match-partial-words Date: Fri, 03 Mar 2006 15:38:10 +0100 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1141397323 10526 80.91.229.2 (3 Mar 2006 14:48:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 3 Mar 2006 14:48:43 +0000 (UTC) Original-X-From: ding-owner+m10671@lists.math.uh.edu Fri Mar 03 15:48:42 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FFBZq-00029s-WF for ding-account@gmane.org; Fri, 03 Mar 2006 15:48:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FFBZh-0002s9-00; Fri, 03 Mar 2006 08:48:09 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FFBQx-0002s3-00 for ding@lists.math.uh.edu; Fri, 03 Mar 2006 08:39:07 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1FFBQs-0001UY-By for ding@lists.math.uh.edu; Fri, 03 Mar 2006 08:39:07 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FFBQr-0005jQ-00 for ; Fri, 03 Mar 2006 15:39:01 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FFBQl-0008JY-1v for ding@gnus.org; Fri, 03 Mar 2006 15:38:55 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de ([134.60.10.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Mar 2006 15:38:55 +0100 Original-Received: from Reiner.Steib by bridgekeeper.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Mar 2006 15:38:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 112 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T;w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv,vbL^XF1nIp\:F=$Ei2o&mEe:%N~,:3]vtQ~s9u$9izmX$IF@VgGl7/,^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Copies-To: nobody User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:XozHXUI2S0AbAMHL35VR5fSZHiU= X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62143 Archived-At: On Fri, Mar 03 2006, Katsumi Yamaoka wrote: >>>>>> In >>>>>> Fabrice Popineau wrote: > >> 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) [...] >> 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. > >> - (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)) > > Thank you for the patch, but it seems to be better to use > "\\\\\\[.*\\\\\\]" because "\\[.*\\]" matches "[0-9]", "[a-z]", > etc. Does anyone notice other adverse effects? I'd rather not put such a special treatment into the code _if_ we can avoid it. The current behavior is quite clearly documented[1]. For "@foo" there is a similar problem, which can be solved by adding ".*": ,---- | ELISP> (string-match (concat "\\<" "@foo\\.bar\\.invalid" "\\>") | "someone@foo.bar.invalid") | nil | ELISP> (string-match (concat "\\<" ".*@foo\\.bar\\.invalid" "\\>") | "someone@foo.bar.invalid") | 0 `---- But the ".*" trick doesn't work in Fabrice's example: ,---- | ELISP> (string-match "\\<.*\\[ce\\]" "[ce] blu") | nil `---- Hm, isn't there a simple trick for this one, too? Or we could add a forth element specifying the partial-words behavior in the split rule: ("subject" ".*\\[ce\\].*" foo.ce t) >> BTW, all occurences of set-file-modes should be replaced with >> gnus-set-file-modes for windows users'sake (at least under xemacs). > >> - (set-file-modes filename nnmail-default-file-modes))) >> + (gnus-set-file-modes filename nnmail-default-file-modes))) > > I think it should be applied anyway. mail-source.el and > mm-decode.el also use set-file-modes. > >> I'm using xemacs 21.5.b21 under native windows for what it worth. > > I will install those changes if no one comments within a couple > of days. I didn't investigate the callers, but maybe it *should* give an error if the modes cannot be set appropriately. (Shouldn't the respective (X)Emacs function care for those file system / operation system details?) *time passes* ... After reading the discussion , I think we should change `gnus-set-file-modes' as follows... ;; See http://thread.gmane.org/gmane.emacs.gnus.general/57528 (defcustom gnus-ignore-set-file-modes-errors nil "Ignore errors when calling `set-file-modes'." :type boolean :version "23.0" ;; No Gnus :group 'gnus-various) (defun gnus-set-file-modes (filename mode) "Wrapper for set-file-modes." (if gnus-ignore-set-file-modes-errors (ignore-errors (set-file-modes filename mode)) (set-file-modes filename mode))) Bye, Reiner. [1] ,----[ (info "(gnus)Fancy Mail Splitting") ] | In these splits, FIELD must match a complete field name. VALUE must | match a complete word according to the fundamental mode syntax table. | You can use `.*' in the regexps to match partial field names or words. | In other words, all VALUE's are wrapped in `\<' and `\>' pairs. | | [...] | | `nnmail-split-fancy-match-partial-words' controls whether partial | words are matched during fancy splitting. | | Normally, regular expressions given in `nnmail-split-fancy' are | implicitly surrounded by `\<...\>' markers, which are word delimiters. | If this variable is true, they are not implicitly surrounded by | anything. `---- -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/