Gnus development mailing list
 help / color / mirror / Atom feed
* per group split rules
@ 2021-11-08 19:16 Jose A. Ortega Ruiz
  2021-11-08 21:06 ` Emanuel Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Jose A. Ortega Ruiz @ 2021-11-08 19:16 UTC (permalink / raw)
  To: ding

hi,

i have my mail-sources set to '((group)), so that each of my nnml groups
has a mail-source of its own (typically reading a spool file or a local
maildir, populated asynchronously).  is there a way of having split
rules (fancy or not) that apply /only/ to a given nnml group, rather
than globally to all incoming mail?

or, alternatively, is it possible to have a (global) split rule that
says (when nnmail-resplit-incoming is t) something like: "leave this
message in the group which fetched it via its mail-source parameter"?

cheers,
jao
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?



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

* Re: per group split rules
  2021-11-08 19:16 per group split rules Jose A. Ortega Ruiz
@ 2021-11-08 21:06 ` Emanuel Berg
  2021-11-08 22:38   ` Jose A. Ortega Ruiz
  2021-11-08 23:21   ` Jose A. Ortega Ruiz
  0 siblings, 2 replies; 5+ messages in thread
From: Emanuel Berg @ 2021-11-08 21:06 UTC (permalink / raw)
  To: ding

Jose A. Ortega Ruiz wrote:

> i have my mail-sources set to '((group)), so that each of my
> nnml groups has a mail-source of its own (typically reading
> a spool file or a local maildir, populated asynchronously).
> is there a way of having split rules (fancy or not) that
> apply /only/ to a given nnml group, rather than globally to
> all incoming mail?

Respooling perhaps ... how often/when is this supposed
to happen?

> or, alternatively, is it possible to have a (global) split
> rule that says (when nnmail-resplit-incoming is t) something
> like: "leave this message in the group which fetched it via
> its mail-source parameter"?

You can use functions instead of regexps both with fancy and
regular so put it there if so, I guess?

> A: Because it fouls the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?

Ha. See RFC 3676, section 4.3 (Usenet Signature Convention)

  https://www.ietf.org/rfc/rfc3676.txt
  
for the second most annoying thing. (Actually it isn't
so annoying.)

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: per group split rules
  2021-11-08 21:06 ` Emanuel Berg
@ 2021-11-08 22:38   ` Jose A. Ortega Ruiz
  2021-11-08 23:46     ` Emanuel Berg
  2021-11-08 23:21   ` Jose A. Ortega Ruiz
  1 sibling, 1 reply; 5+ messages in thread
From: Jose A. Ortega Ruiz @ 2021-11-08 22:38 UTC (permalink / raw)
  To: ding

On Mon, Nov 08 2021, Emanuel Berg wrote:

> Jose A. Ortega Ruiz wrote:
>
>> i have my mail-sources set to '((group)), so that each of my
>> nnml groups has a mail-source of its own (typically reading
>> a spool file or a local maildir, populated asynchronously).
>> is there a way of having split rules (fancy or not) that
>> apply /only/ to a given nnml group, rather than globally to
>> all incoming mail?
>
> Respooling perhaps ... how often/when is this supposed
> to happen?

every time i import new mail, so i think that's not going to be
practical.

>> or, alternatively, is it possible to have a (global) split
>> rule that says (when nnmail-resplit-incoming is t) something
>> like: "leave this message in the group which fetched it via
>> its mail-source parameter"?
>
> You can use functions instead of regexps both with fancy and
> regular so put it there if so, I guess?

yes, one of my first thoughts, but when a splitting function is called,
the incoming mail has been inserted in a temp current buffer and there
seems to be no way of knowing what its original mail-source was (but i
have to try again and check the value of that variable, maybe it's still
set... i am not sure i tried that).

thanks,
jao
-- 
Besides the noble art of getting things done, there is the noble art
of leaving things undone. The wisdom of life consists in the
elimination of nonessentials.
  -Lin Yutang, writer and translator (1895-1976)



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

* Re: per group split rules
  2021-11-08 21:06 ` Emanuel Berg
  2021-11-08 22:38   ` Jose A. Ortega Ruiz
@ 2021-11-08 23:21   ` Jose A. Ortega Ruiz
  1 sibling, 0 replies; 5+ messages in thread
From: Jose A. Ortega Ruiz @ 2021-11-08 23:21 UTC (permalink / raw)
  To: ding

On Mon, Nov 08 2021, Emanuel Berg wrote:

[...]

>> or, alternatively, is it possible to have a (global) split
>> rule that says (when nnmail-resplit-incoming is t) something
>> like: "leave this message in the group which fetched it via
>> its mail-source parameter"?
>
> You can use functions instead of regexps both with fancy and
> regular so put it there if so, I guess?

actually, turns out it's even simpler: gnus adds a header called
X-Gnus-Mail-Source with the value of the message's mail-source, so since
i can infer the nnml default group from it, i can write the default rule
i wished for above!

thanks for your suggestion, though... it was playing again with
splitting functions that i discovered this (undocumented, i think)
header :)

cheers,
jao
-- 
You are never too old to be what you might have been.
 -George Eliot (Mary Ann Evans), novelist (1819-1880)



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

* Re: per group split rules
  2021-11-08 22:38   ` Jose A. Ortega Ruiz
@ 2021-11-08 23:46     ` Emanuel Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2021-11-08 23:46 UTC (permalink / raw)
  To: ding

Jose A. Ortega Ruiz wrote:

> yes, one of my first thoughts, but when a splitting function
> is called, the incoming mail has been inserted in a temp
> current buffer and there seems to be no way of knowing what
> its original mail-source was (but i have to try again and
> check the value of that variable, maybe it's still set...
> i am not sure i tried that).

So you are sorting based on something that has happened yet
didn't leave a trace?

Maybe you can tell it to add a header just telling?

Then you can split on that super-easy with a regexp, no need
for a function.

-- 
underground experts united
https://dataswamp.org/~incal



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

end of thread, other threads:[~2021-11-09  0:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 19:16 per group split rules Jose A. Ortega Ruiz
2021-11-08 21:06 ` Emanuel Berg
2021-11-08 22:38   ` Jose A. Ortega Ruiz
2021-11-08 23:46     ` Emanuel Berg
2021-11-08 23:21   ` Jose A. Ortega Ruiz

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