* Automatically strip text from emails
@ 2023-11-14 11:02 John Haman
2023-11-14 17:52 ` Andreas Schwab
2023-12-19 5:32 ` Emanuel Berg
0 siblings, 2 replies; 5+ messages in thread
From: John Haman @ 2023-11-14 11:02 UTC (permalink / raw)
To: ding
Sometimes writers have over the top templates that I'd like to just remove so that I can focus on the substance of the conversation. One poster put this monstrosity in all of their emails:
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
How can I automatically scrub this text from all emails I receive?
--
Dr. John Haman
Maryland, USA
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Automatically strip text from emails
2023-11-14 11:02 Automatically strip text from emails John Haman
@ 2023-11-14 17:52 ` Andreas Schwab
2023-11-14 23:54 ` Dan Christensen
2023-11-15 20:48 ` Emanuel Berg
2023-12-19 5:32 ` Emanuel Berg
1 sibling, 2 replies; 5+ messages in thread
From: Andreas Schwab @ 2023-11-14 17:52 UTC (permalink / raw)
To: John Haman; +Cc: ding
On Nov 14 2023, John Haman wrote:
> How can I automatically scrub this text from all emails I receive?
See article-strip-banner.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Automatically strip text from emails
2023-11-14 17:52 ` Andreas Schwab
@ 2023-11-14 23:54 ` Dan Christensen
2023-11-15 20:48 ` Emanuel Berg
1 sibling, 0 replies; 5+ messages in thread
From: Dan Christensen @ 2023-11-14 23:54 UTC (permalink / raw)
To: ding
On Nov 14, 2023, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Nov 14 2023, John Haman wrote:
>
>> How can I automatically scrub this text from all emails I receive?
>
> See article-strip-banner.
I'm trying to strip those annoying banners that Office365 adds to
incoming messages: "You don't often get mail from..." I've got it
working for plain text parts, but many messages are html, and the banner
is a table. Does anyone know how to strip a banner from html? Do you
match against the html itself? After decoding the part, I assume?
So far my attempts have failed.
Dan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Automatically strip text from emails
2023-11-14 17:52 ` Andreas Schwab
2023-11-14 23:54 ` Dan Christensen
@ 2023-11-15 20:48 ` Emanuel Berg
1 sibling, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2023-11-15 20:48 UTC (permalink / raw)
To: ding
Andreas Schwab wrote:
>> How can I automatically scrub this text from all emails
>> I receive?
>
> See article-strip-banner.
Please share if you got it to work.
I have the below function to do additional article washing but
the `article-strip-banner' method seems better in this case
since it only applies for an individual user.
Of the below stuff I don't know if any of it can be removed
using options instead, probably that would be preferable
if so.
(defun gnus-article-wash-more ()
(article-translate-strings
'(
("#+begin_quote\n" "")
("#+end_quote\n" "")
("#+begin_src emacs-lisp\n" "")
("#+begin_src r\n" "")
("#+end_src\n" "")
("--8<---------------cut" "")
("here---------------end--------------->8---" "")
("here---------------start------------->8---" "")
("Sendt fra min iPad" "")
("Sent using Zoho Mail" "")
("Skickades från E-post för Windows 10" "")
("Skickat från Yahoo Mail för iPhone" "")
("naïve" "naive")
("ʼ" "'")
("⇒" "→")
("➜" "→")
("⟦" "[")
("⟧" "]")
("> > > >" ">>>>")
("> > >" ">>>")
("> >" ">>")
("colour" "color")
("⛔" "!")
(" " " ")
("・" "·")
("I’m" "I'm")
("doesn’t" "doesn't")
))
(gnus-article-strip-multiple-blank-lines) )
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Automatically strip text from emails
2023-11-14 11:02 Automatically strip text from emails John Haman
2023-11-14 17:52 ` Andreas Schwab
@ 2023-12-19 5:32 ` Emanuel Berg
1 sibling, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2023-12-19 5:32 UTC (permalink / raw)
To: ding
John Haman wrote:
> Sometimes writers have over the top templates that I'd like
> to just remove so that I can focus on the substance of the
> conversation. One poster put this monstrosity in all of
> their emails:
>
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> How can I automatically scrub this text from all emails
> I receive?
(setq gnus-article-address-banner-alist
'(("rms@gnu\\.org\\'" . "\\[\\[\\[ .* \\]\\]\\]\n")) )
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-19 5:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14 11:02 Automatically strip text from emails John Haman
2023-11-14 17:52 ` Andreas Schwab
2023-11-14 23:54 ` Dan Christensen
2023-11-15 20:48 ` Emanuel Berg
2023-12-19 5:32 ` Emanuel Berg
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).