* Limit nnmail-split-fancy-with-parent to certain groups?
@ 2001-07-24 21:18 Raymond Scholz
2001-07-24 22:40 ` Kai Großjohann
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Raymond Scholz @ 2001-07-24 21:18 UTC (permalink / raw)
Hi!
Is there a simple way of limiting the application of
nnmail-split-fancy-with-parent to certain groups? Can this be done by
not recording message-IDs in nnmail-message-id-cache-file for these
groups? And if so, how could this be done?
Background: I overlooked some personal replies in high volume mailing
lists.
Furthermore I suspect this feature not to work as described in the Info
documentation:
,----
| When `nnmail-cache-accepted-message-ids' is non-`nil', Gnus
| also records the message ids of moved articles, so that the followup
| messages goes into the new group.
`----
I've moved a personal reply from folder A into another folder B, went
to B, composed my reply (which ends up in B too because of gcc-self)
but the answer to my reply ended up in A. Can anyone confirm this?
Cheers, Ray
--
"I heard if you play the NT-4.0-CD backwards, you get a satanic message."
"Thats nothing, if you play it forward, it installs NT-4.0"
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-07-24 21:18 Limit nnmail-split-fancy-with-parent to certain groups? Raymond Scholz
@ 2001-07-24 22:40 ` Kai Großjohann
2001-07-25 20:22 ` Raymond Scholz
2001-07-24 23:16 ` ShengHuo ZHU
2001-07-27 16:52 ` ShengHuo ZHU
2 siblings, 1 reply; 17+ messages in thread
From: Kai Großjohann @ 2001-07-24 22:40 UTC (permalink / raw)
On Tue, 24 Jul 2001, Raymond Scholz wrote:
> Is there a simple way of limiting the application of
> nnmail-split-fancy-with-parent to certain groups? Can this be done
> by not recording message-IDs in nnmail-message-id-cache-file for
> these groups? And if so, how could this be done?
You would have to frob the code. But it wouldn't be difficult.
> Background: I overlooked some personal replies in high volume
> mailing lists.
Hm. Yeah. Bad. Hm. Your feature sounds useful.
Lessee.
Ah. In the function nnmail-split-fancy-with-parent there is a section
where it looks whether the group is "drafts". If so, nil is returned
rather than the group name.
So the extension ought to be simple: define a variable which is a
regex. And augment the above mentioned statement to check against
that regex rather than just the string "drafts".
Can you make that change and submit a patch?
> Furthermore I suspect this feature not to work as described in the
> Info documentation:
>
> ,----
> | When `nnmail-cache-accepted-message-ids' is non-`nil', Gnus also
> | records the message ids of moved articles, so that the followup
> | messages goes into the new group.
> `----
>
> I've moved a personal reply from folder A into another folder B,
> went to B, composed my reply (which ends up in B too because of
> gcc-self) but the answer to my reply ended up in A. Can anyone
> confirm this?
Sadly, I can't reproduce this bug. So I can't fix it. Anyone?
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-07-24 21:18 Limit nnmail-split-fancy-with-parent to certain groups? Raymond Scholz
2001-07-24 22:40 ` Kai Großjohann
@ 2001-07-24 23:16 ` ShengHuo ZHU
2001-07-25 20:32 ` Raymond Scholz
2001-07-27 16:52 ` ShengHuo ZHU
2 siblings, 1 reply; 17+ messages in thread
From: ShengHuo ZHU @ 2001-07-24 23:16 UTC (permalink / raw)
Raymond Scholz <ray-2001@zonix.de> writes:
[...]
> Furthermore I suspect this feature not to work as described in the Info
> documentation:
>
> ,----
>| When `nnmail-cache-accepted-message-ids' is non-`nil', Gnus
>| also records the message ids of moved articles, so that the followup
>| messages goes into the new group.
> `----
>
> I've moved a personal reply from folder A into another folder B, went
> to B, composed my reply (which ends up in B too because of gcc-self)
> but the answer to my reply ended up in A. Can anyone confirm this?
I think I've fixed this before, but maybe only for some backends.
What kind of backends are you using?
ShengHuo
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-07-24 22:40 ` Kai Großjohann
@ 2001-07-25 20:22 ` Raymond Scholz
2001-07-25 21:56 ` ShengHuo ZHU
2001-08-04 9:14 ` Raymond Scholz
0 siblings, 2 replies; 17+ messages in thread
From: Raymond Scholz @ 2001-07-25 20:22 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 234 bytes --]
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> Can you make that change and submit a patch?
Most probably I screwed something up, so please have a look at the
code. It's stolen from nnmail-list-identifiers's usage.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnmail.el.patch --]
[-- Type: text/x-patch, Size: 1425 bytes --]
--- nnmail.el.old Wed Jul 25 22:04:04 2001
+++ nnmail.el Wed Jul 25 22:20:40 2001
@@ -115,6 +115,14 @@
:group 'nnmail-split
:type 'boolean)
+(defcustom nnmail-split-fancy-with-parent-ignore-groups nil
+ "Regexp that matches group names to be ignored when applying
+`nnmail-split-fancy-with-parent'. This can also be a list of regexps."
+ :group 'nnmail-split
+ :type '(choice (const :tag "none" nil)
+ (regexp :value ".*")
+ (repeat :value (".*") regexp)))
+
;; Added by gord@enci.ucalgary.ca (Gordon Matzigkeit).
(defcustom nnmail-keep-last-article nil
"If non-nil, nnmail will never delete/move a group's last article.
@@ -1472,14 +1480,18 @@
(let* ((refstr (or (message-fetch-field "references")
(message-fetch-field "in-reply-to")))
(references nil)
- (res nil))
+ (res nil)
+ (regexp (if (consp nnmail-split-fancy-with-parent-ignore-groups)
+ (mapconcat 'nnmail-split-fancy-with-parent-ignore-groups " *\\|")
+ nnmail-split-fancy-with-parent-ignore-groups)))
(when refstr
(setq references (nreverse (gnus-split-references refstr)))
(unless (gnus-buffer-live-p nnmail-cache-buffer)
(nnmail-cache-open))
(mapcar (lambda (x)
(setq res (or (nnmail-cache-fetch-group x) res))
- (when (string= "drafts" res)
+ (when (or (string= "drafts" res)
+ (and regexp (string-match regexp res)))
(setq res nil)))
references)
res)))
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: gnus.texi.patch --]
[-- Type: text/x-patch, Size: 1209 bytes --]
--- gnus.texi.old Wed Jul 25 22:17:19 2001
+++ gnus.texi Wed Jul 25 22:07:25 2001
@@ -12199,11 +12199,12 @@
@code{nnmail-split-fancy-with-parent} then looks at the References (and
In-Reply-To) header of each message to split and searches the file
specified by @code{nnmail-message-id-cache-file} for the message ids.
-When it has found a parent, it returns the corresponding group name. It
-is recommended that you set @code{nnmail-message-id-cache-length} to a
-somewhat higher number than the default so that the message ids are
-still in the cache. (A value of 5000 appears to create a file some 300
-kBytes in size.)
+When it has found a parent, it returns the corresponding group name
+unless the group name matches the regexp
+@code{nnmail-split-fancy-with-parent-ignore-groups}. It is recommended
+that you set @code{nnmail-message-id-cache-length} to a somewhat higher
+number than the default so that the message ids are still in the cache.
+(A value of 5000 appears to create a file some 300 kBytes in size.)
@vindex nnmail-cache-accepted-message-ids
When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
also records the message ids of moved articles, so that the followup
[-- Attachment #4: Type: text/plain, Size: 473 bytes --]
and
2001-07-25 22:22:22 Raymond Scholz <rscholz@zonix.de>
* nnmail.el (nnmail-split-fancy-with-parent-ignore-groups): New variable.
(nnmail-split-fancy-with-parent): Ignore certain groups.
and
2001-07-25 22:22:22 Raymond Scholz <rscholz@zonix.de>
* gnus.texi (Fancy Mail Splitting): New variable
nnmail-split-fancy-with-parent-ignore-groups
Cheers, Ray
--
Q: What have american beer and sex in a canoe in common?
A: Both are fucking close to water.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-07-24 23:16 ` ShengHuo ZHU
@ 2001-07-25 20:32 ` Raymond Scholz
0 siblings, 0 replies; 17+ messages in thread
From: Raymond Scholz @ 2001-07-25 20:32 UTC (permalink / raw)
ShengHuo ZHU <zsh@cs.rochester.edu> writes:
> I think I've fixed this before, but maybe only for some backends.
> What kind of backends are you using?
Just nnfolder.
Cheers, Ray
--
C-x i ~/.signature
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-07-25 20:22 ` Raymond Scholz
@ 2001-07-25 21:56 ` ShengHuo ZHU
2001-08-04 9:14 ` Raymond Scholz
1 sibling, 0 replies; 17+ messages in thread
From: ShengHuo ZHU @ 2001-07-25 21:56 UTC (permalink / raw)
Raymond Scholz <ray-2001@zonix.de> writes:
> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> Can you make that change and submit a patch?
>
> Most probably I screwed something up, so please have a look at the
> code. It's stolen from nnmail-list-identifiers's usage.
> and
>
> 2001-07-25 22:22:22 Raymond Scholz <rscholz@zonix.de>
>
> * nnmail.el (nnmail-split-fancy-with-parent-ignore-groups): New variable.
> (nnmail-split-fancy-with-parent): Ignore certain groups.
>
>
> and
>
> 2001-07-25 22:22:22 Raymond Scholz <rscholz@zonix.de>
>
> * gnus.texi (Fancy Mail Splitting): New variable
> nnmail-split-fancy-with-parent-ignore-groups
Installed.
ShengHuo
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-07-24 21:18 Limit nnmail-split-fancy-with-parent to certain groups? Raymond Scholz
2001-07-24 22:40 ` Kai Großjohann
2001-07-24 23:16 ` ShengHuo ZHU
@ 2001-07-27 16:52 ` ShengHuo ZHU
2001-07-28 16:06 ` Raymond Scholz
2 siblings, 1 reply; 17+ messages in thread
From: ShengHuo ZHU @ 2001-07-27 16:52 UTC (permalink / raw)
Raymond Scholz <ray-2001@zonix.de> writes:
> Hi!
>
> Is there a simple way of limiting the application of
> nnmail-split-fancy-with-parent to certain groups? Can this be done by
> not recording message-IDs in nnmail-message-id-cache-file for these
> groups? And if so, how could this be done?
>
> Background: I overlooked some personal replies in high volume mailing
> lists.
>
> Furthermore I suspect this feature not to work as described in the Info
> documentation:
>
> ,----
>| When `nnmail-cache-accepted-message-ids' is non-`nil', Gnus
>| also records the message ids of moved articles, so that the followup
>| messages goes into the new group.
> `----
>
> I've moved a personal reply from folder A into another folder B, went
> to B, composed my reply (which ends up in B too because of gcc-self)
> but the answer to my reply ended up in A. Can anyone confirm this?
I just committed a patch of nnfolder.el. Maybe it is related. Please
test.
ShengHuo
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-07-27 16:52 ` ShengHuo ZHU
@ 2001-07-28 16:06 ` Raymond Scholz
0 siblings, 0 replies; 17+ messages in thread
From: Raymond Scholz @ 2001-07-28 16:06 UTC (permalink / raw)
ShengHuo ZHU <zsh@cs.rochester.edu> writes:
>> I've moved a personal reply from folder A into another folder B, went
>> to B, composed my reply (which ends up in B too because of gcc-self)
>> but the answer to my reply ended up in A. Can anyone confirm this?
>
> I just committed a patch of nnfolder.el. Maybe it is related. Please
> test.
Looks like it's fixed now. Thanks!
Cheers, Ray
--
"The obvious mathematical breakthrough would be development of an easy way
to factor large prime numbers." (Bill Gates from The Road Ahead, p265)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-07-25 20:22 ` Raymond Scholz
2001-07-25 21:56 ` ShengHuo ZHU
@ 2001-08-04 9:14 ` Raymond Scholz
2001-08-04 11:34 ` Kai Großjohann
2001-08-04 13:18 ` Kai Großjohann
1 sibling, 2 replies; 17+ messages in thread
From: Raymond Scholz @ 2001-08-04 9:14 UTC (permalink / raw)
Raymond Scholz <ray-2001@zonix.de> writes:
> Most probably I screwed something up, so please have a look at the
> code.
Ouch, I certainly did. And I can't find the error. Symptom: messages
with references (in References: or In-Reply-To:) but no matching
message-id in the nnmail cache end up in bogus.
`nnmail-split-fancy-with-parent' obviously returns some return value
it should not return.
,----[ *Messages* ]
| Error in `nnmail-split-methods'; using `bogus' mail group
| This message would go to bogus
`----
The error must be in this part of `nnmail-split-fancy-with-parent':
(when (or (string= "drafts" res)
(and regexp (string-match regexp res)))
(setq res nil)))
I really feel bad for providing a buggy feature and not knowing how to
fix it :(
Cheers, Ray
--
WYSIWYG is a step backwards. Human labor is used to do that which the
computer can do better. (Andrew S. Tanenbaum)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-08-04 9:14 ` Raymond Scholz
@ 2001-08-04 11:34 ` Kai Großjohann
2001-08-04 12:30 ` Raymond Scholz
2001-08-04 13:18 ` Kai Großjohann
1 sibling, 1 reply; 17+ messages in thread
From: Kai Großjohann @ 2001-08-04 11:34 UTC (permalink / raw)
On Sat, 04 Aug 2001, Raymond Scholz wrote:
> The error must be in this part of `nnmail-split-fancy-with-parent':
>
> (when (or (string= "drafts" res)
> (and regexp (string-match regexp res)))
> (setq res nil)))
>
> I really feel bad for providing a buggy feature and not knowing how
> to fix it :(
I think the error was in the let statement which computed the value of
regexp. The mapconcat syntax was bogus.
I've tried to fix it, but I now use nnimap, so I can't test that part
of the code. Please try it:
- with a list of regexes in
nnmail-split-fancy-with-parent-ignore-groups
- with a single regex in the variable
New version in CVS.
Thanks,
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-08-04 11:34 ` Kai Großjohann
@ 2001-08-04 12:30 ` Raymond Scholz
2001-08-04 13:17 ` Kai Großjohann
2001-08-04 13:19 ` Kai Großjohann
0 siblings, 2 replies; 17+ messages in thread
From: Raymond Scholz @ 2001-08-04 12:30 UTC (permalink / raw)
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> I think the error was in the let statement which computed the value of
> regexp. The mapconcat syntax was bogus.
Ah, does that mean `nnmail-remove-list-identifiers' is buggy too?
> I've tried to fix it, but I now use nnimap, so I can't test that part
> of the code. Please try it:
>
> - with a list of regexes in
> nnmail-split-fancy-with-parent-ignore-groups
> - with a single regex in the variable
Sorry, I still get the same error message as before.
Cheers, Ray
--
Hfr fgebat rapelcgvba!
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-08-04 12:30 ` Raymond Scholz
@ 2001-08-04 13:17 ` Kai Großjohann
2001-08-04 13:19 ` Kai Großjohann
1 sibling, 0 replies; 17+ messages in thread
From: Kai Großjohann @ 2001-08-04 13:17 UTC (permalink / raw)
Raymond Scholz <ray-2001@zonix.de> writes:
> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> I think the error was in the let statement which computed the value of
>> regexp. The mapconcat syntax was bogus.
>
> Ah, does that mean `nnmail-remove-list-identifiers' is buggy too?
No, you made a typo. You changed from
(mapconcat 'identity x "bla")
to
(mapconcat 'x "bla")
>> I've tried to fix it, but I now use nnimap, so I can't test that part
>> of the code. Please try it:
>>
>> - with a list of regexes in
>> nnmail-split-fancy-with-parent-ignore-groups
>> - with a single regex in the variable
>
> Sorry, I still get the same error message as before.
Argh.
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-08-04 9:14 ` Raymond Scholz
2001-08-04 11:34 ` Kai Großjohann
@ 2001-08-04 13:18 ` Kai Großjohann
2001-08-04 13:58 ` Raymond Scholz
1 sibling, 1 reply; 17+ messages in thread
From: Kai Großjohann @ 2001-08-04 13:18 UTC (permalink / raw)
Raymond Scholz <ray-2001@zonix.de> writes:
> Ouch, I certainly did. And I can't find the error. Symptom: messages
> with references (in References: or In-Reply-To:) but no matching
> message-id in the nnmail cache end up in bogus.
> `nnmail-split-fancy-with-parent' obviously returns some return value
> it should not return.
Please check whether this is indeed the case. Go to a message which
was put in bogus. Do C-u g on it. Go to the article buffer. Invoke
nnmail-split-fancy-with-parent:
M-: (nnmail-split-fancy-with-parent) RET
Does it return nil, as it should?
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-08-04 12:30 ` Raymond Scholz
2001-08-04 13:17 ` Kai Großjohann
@ 2001-08-04 13:19 ` Kai Großjohann
1 sibling, 0 replies; 17+ messages in thread
From: Kai Großjohann @ 2001-08-04 13:19 UTC (permalink / raw)
Raymond Scholz <ray-2001@zonix.de> writes:
> Sorry, I still get the same error message as before.
Just a sanity check: did you remember to byte-compile?
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-08-04 13:18 ` Kai Großjohann
@ 2001-08-04 13:58 ` Raymond Scholz
2001-08-04 14:44 ` Kai Großjohann
0 siblings, 1 reply; 17+ messages in thread
From: Raymond Scholz @ 2001-08-04 13:58 UTC (permalink / raw)
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> Please check whether this is indeed the case. Go to a message which
> was put in bogus. Do C-u g on it. Go to the article buffer. Invoke
> nnmail-split-fancy-with-parent:
>
> M-: (nnmail-split-fancy-with-parent) RET
>
> Does it return nil, as it should?
Gah, I think I got it. Thanks for showing this way of debugging the
function.
The string-match will fail if res is nil.
(when (or (string= "drafts" res)
(and regexp (string-match regexp res)))
(setq res nil)))
So it should look like this:
(when (or (string= "drafts" res)
(and res regexp (string-match regexp res)))
(setq res nil)))
Right?
Cheers, Ray
--
Look Ma, this man can twist his fingers as if they were made of rubber,
isn't that amazing? -- Not really, he's been using Emacs for years...!
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-08-04 13:58 ` Raymond Scholz
@ 2001-08-04 14:44 ` Kai Großjohann
2001-08-04 15:37 ` Raymond Scholz
0 siblings, 1 reply; 17+ messages in thread
From: Kai Großjohann @ 2001-08-04 14:44 UTC (permalink / raw)
Raymond Scholz <ray-2001@zonix.de> writes:
> The string-match will fail if res is nil.
Good shot! New version in CVS. Please test.
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Limit nnmail-split-fancy-with-parent to certain groups?
2001-08-04 14:44 ` Kai Großjohann
@ 2001-08-04 15:37 ` Raymond Scholz
0 siblings, 0 replies; 17+ messages in thread
From: Raymond Scholz @ 2001-08-04 15:37 UTC (permalink / raw)
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> Good shot! New version in CVS. Please test.
Works.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2001-08-04 15:37 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-24 21:18 Limit nnmail-split-fancy-with-parent to certain groups? Raymond Scholz
2001-07-24 22:40 ` Kai Großjohann
2001-07-25 20:22 ` Raymond Scholz
2001-07-25 21:56 ` ShengHuo ZHU
2001-08-04 9:14 ` Raymond Scholz
2001-08-04 11:34 ` Kai Großjohann
2001-08-04 12:30 ` Raymond Scholz
2001-08-04 13:17 ` Kai Großjohann
2001-08-04 13:19 ` Kai Großjohann
2001-08-04 13:18 ` Kai Großjohann
2001-08-04 13:58 ` Raymond Scholz
2001-08-04 14:44 ` Kai Großjohann
2001-08-04 15:37 ` Raymond Scholz
2001-07-24 23:16 ` ShengHuo ZHU
2001-07-25 20:32 ` Raymond Scholz
2001-07-27 16:52 ` ShengHuo ZHU
2001-07-28 16:06 ` Raymond Scholz
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).