| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
* Daniel Goldman <[email protected]> [2016-01-21 19:07]:
> Does the t-prot tool take care of the comb-quoting problem?
> If so, maybe it's not a bad idea to take advantage of that
> capability in this instance. Again, if you put the filter inside a
> shell wrapper, you can potentially take advantage of multiple tools,
> use sed for X problem, t-prot for Y problem, ex for Z problem.
yes - a script to employ more than one tool is a neat idea.
but for now i am still trying to put it all into if possible.
next step is maybe to put the really necessary things into awk.
so it will still be "one program - with one setup file."
t-prot is written in perl5 and simply hides text, like this:
[---=| TOFU protection by t-prot: 23 lines snipped |=---]
DESCRIPTION
This program is a filter to improve the readability of
internet messages (emails and usenet posts) by *hiding*
some annoying parts, e.g. mailing list footers,
signatures, and TOFU (see definition below), as well as
squeezing sequences of blank lines or punctuation.
source: script+manual -> http://www.escape.de/~tolot/mutt/
written by Jochen Striepe
and he references the display_filter script by Phil Gold:
http://aperiodic.net/phil/configs/bin/mutt-display-filter
this one uses t-prot (though commented out) and sed. :-)
> When I see this problem with comb-quoting, I seem to remember it
> happens when the quote is indented several levels (makes sense).
> Is that the case with you? If so, that would complicate the solution,
> because the quoted line might start with > or >> or >> etc.
indeed - a simple fix only caters for the first level of
quotation only. this is far from perfect, of course.
i still have to fix it all when i respond to
the message. but this is where vim gets in.
vim has support for built-in reformatting which
easily caters for multiple levels of quotation.
so once i fix this comb-quoting by joining those
dangling words from short lines to the previous line
then a reformatting of the paragraph does it all. :)
Sven