From: Moritz Wilhelmy <moritz+sup@wzff.de>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] How to treat List-Id headers (Was: best method for before-add-message.rb)
Date: Sun, 13 Feb 2011 14:00:27 +0100 [thread overview]
Message-ID: <1297600750-sup-2275@niflheimr> (raw)
In-Reply-To: <1297589599-sup-596@tilus.net>
Hello,
Excerpts from Tero Tilus's message of Sun Feb 13 10:51:02 +0100 2011:
> > what would be the best way to match - for instance - the
> > List-Id-Header in case it's present?
> List-Id is a whole separate kind of beast. My stragy dealing with it
> looks like this. Comments in finnish. Go google translate. ;)
Ah, well, the problem I have is something like this
List-Id: "very long descriptive text on what the list is about"
<list.lists.something.com>
Because the actual List-Id is so long, it's sometimes wrapped into the next
line per convention (i.e. when the descriptive text is already very long and
the line needs to be wrapped because the actual List-Id would exceed the
character limit per line, I think it's around 80 characters). Thus, my regexes
don't match in all cases. I want to match the list by the part between the <>,
not the descriptive text, which is a bit problematic because of the
line-wrapping. However, if I could get the full List-Id line from the parsed
headers hashtable, this would eliminate my parsing problems.
> > Can I pull arbitrary, parsed headers directly out of the message
> > object, or do I have to do my own parsing?
> Uh, oh. Looks like no, but it is pretty close, berause
> Message#parse_header already builds parsed hash of arbitrary headers
> internally.
Well, making this publicly accessible to the before-add-message hook would
simplify a lot of the stuff I do with my email in order to place the right
labels. So maybe, this is a feature request to the sup developers, but maybe I
also got everything wrong. ;)
Cheers,
Moritz
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
next prev parent reply other threads:[~2011-02-13 13:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 14:44 [sup-talk] best method for before-add-message.rb Philippe LeCavalier
2011-02-10 16:40 ` Mark Alexander
[not found] ` <1297356327-sup-9107@plc.intranet.plecavalier.com>
[not found] ` <1297357197-sup-5893@bloovis.org>
2011-02-10 19:19 ` Philippe LeCavalier
2011-02-10 22:09 ` Philippe LeCavalier
2011-02-13 1:34 ` Moritz Wilhelmy
2011-02-13 9:51 ` Tero Tilus
2011-02-13 13:00 ` Moritz Wilhelmy [this message]
2011-02-13 17:45 ` Rich Lane
2011-02-13 17:12 ` Hamish D
2011-02-13 18:08 ` Philippe LeCavalier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297600750-sup-2275@niflheimr \
--to=moritz+sup@wzff.de \
--cc=sup-talk@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox