Discussion:
"Forward" in the standard way
Jordan Wilson
2016-03-13 20:00:41 UTC
Permalink
I have been trying to forward HTML email (*makes the sign of the
cross*).

I want to have Gnus treat the email content "in the standard way",
i.e. have the HTML content inline (not as an attachment), and renderable
by non-Gnus email clients.

My fiddlings with `message-forward-as-mime' and
`message-forward-show-mml' has got me as far as having the
HTML message inline, but the HTML is unrendered on the other end.

Is there a simple way of doing this using Gnus?
--
Sent from Gnus v5.13, Emacs 25.0.92.1
Adam Sjøgren
2016-03-13 20:31:43 UTC
Permalink
Post by Jordan Wilson
I want to have Gnus treat the email content "in the standard way",
i.e. have the HTML content inline (not as an attachment), and renderable
by non-Gnus email clients.
None of the different ARGs gives what you want?

,----[ C-h f gnus-summary-mail-forward RET ]
| gnus-summary-mail-forward is an interactive autoloaded compiled Lisp
| function in `gnus-msg.el'.
|
| (gnus-summary-mail-forward &optional ARG POST)
|
| Forward the current message(s) to another user.
| If process marks exist, forward all marked messages;
| if ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml';
| if ARG is 1, decode the message and forward directly inline;
| if ARG is 2, forward message as an rfc822 MIME section;
| if ARG is 3, decode message and forward as an rfc822 MIME section;
| if ARG is 4, forward message directly inline;
| otherwise, use flipped `message-forward-as-mime'.
| If POST, post instead of mail.
| For the "inline" alternatives, also see the variable
| `message-forward-ignored-headers'.
|
`----

It sounds like 1 is the one you want?


Best regards,

Adam
--
"Dansk, dette unikum af artikulatorisk økonomi." Adam Sjøgren
***@koldfront.dk
Jordan Wilson
2016-03-13 20:41:56 UTC
Permalink
I've been through all of them, 1 and 4 incline the HTML but it's treated
as plain text by the receiving client. 2 and 3 create attachments of the
old email contents.

Regards,
Jordan
--
Sent from Gnus v5.13, Emacs 25.0.92.1
Adam Sjøgren
2016-03-13 20:44:27 UTC
Permalink
Post by Jordan Wilson
I've been through all of them, 1 and 4 incline the HTML but it's treated
as plain text by the receiving client.
Is your own email plain text or HTML in this case?

I would guess you have to write an HTML-email if you want an inlined
email to be treated as HTML.


Best regards,

Adam
--
"God must've been punting angels left and right." Adam Sjøgren
***@koldfront.dk
Elias Mårtenson
2016-04-06 08:02:05 UTC
Permalink
I wrote an entire package to deal with this issue. It's difficult to do it
right, and I'm not even claiming my tool is good enough for general use
(even though me and several colleagues have used it for years).

https://github.com/lokedhs/gnus-outlook-style
Post by Adam Sjøgren
Post by Jordan Wilson
I've been through all of them, 1 and 4 incline the HTML but it's treated
as plain text by the receiving client.
Is your own email plain text or HTML in this case?
I would guess you have to write an HTML-email if you want an inlined
email to be treated as HTML.
Best regards,
Adam
--
"God must've been punting angels left and right." Adam SjÞgren
_______________________________________________
info-gnus-english mailing list
https://lists.gnu.org/mailman/listinfo/info-gnus-english
Adam Sjøgren
2016-04-06 08:46:38 UTC
Permalink
Post by Elias MÃ¥rtenson
Post by Adam Sjøgren
I would guess you have to write an HTML-email if you want an inlined
email to be treated as HTML.
I wrote an entire package to deal with this issue. It's difficult to do it
right, and I'm not even claiming my tool is good enough for general use
(even though me and several colleagues have used it for years).
https://github.com/lokedhs/gnus-outlook-style
In this context, but a slightly different subject: It would be cool if
Gnus could:

* elide all "full-bottom-quoted" emails, preferably with a line for
each, togglable,

or

* reformat an email containing a thread of emails full-bottom-quoted
into the "correct" format (top quoted)

I guess the latter isn't that useful, but sometimes I reformat threads
to make them understandable.

Like this one :-)


Best regards,

Adam
--
"Facebook cannot control emotions of users. Facebook Adam Sjøgren
will not control emotions of users." - Facebook's COO ***@koldfront.dk
Eric S Fraga
2016-04-06 11:04:04 UTC
Permalink
On Wednesday, 6 Apr 2016 at 10:46, Adam Sjøgren wrote:

[...]
Post by Adam Sjøgren
In this context, but a slightly different subject: It would be cool if
* elide all "full-bottom-quoted" emails, preferably with a line for
each, togglable,
or
* reformat an email containing a thread of emails full-bottom-quoted
into the "correct" format (top quoted)
I guess the latter isn't that useful, but sometimes I reformat threads
to make them understandable.
I would love to have both of those features! The latter is actually of
great potential benefit: I have to live in an Outlook world as well and
it is most annoying to have to read by flipping up and down pages to
figure out what is going on: <eob> <prior>*5 <next>*5 <prior>*8 <next>*3
... :-(
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 25.0.92.1 + Ma Gnus v0.16 + evil-git-ff74cfb
: BBDB version 3.1.2 (2015-10-28 10:47:01+00:00)
Rasmus
2016-04-06 12:53:58 UTC
Permalink
Post by Adam Sjøgren
Post by Elias MÃ¥rtenson
Post by Adam Sjøgren
I would guess you have to write an HTML-email if you want an inlined
email to be treated as HTML.
I wrote an entire package to deal with this issue. It's difficult to do it
right, and I'm not even claiming my tool is good enough for general use
(even though me and several colleagues have used it for years).
https://github.com/lokedhs/gnus-outlook-style
In this context, but a slightly different subject: It would be cool if
* elide all "full-bottom-quoted" emails, preferably with a line for
each, togglable,
or
* reformat an email containing a thread of emails full-bottom-quoted
into the "correct" format (top quoted)
I guess the latter isn't that useful, but sometimes I reformat threads
to make them understandable.
I'd like to see both features; the latter more than the former.

Rasmus
--
Tack, ni svenska vakttorn. Med plutonium tvingar vi dansken på knä!
Elias Mårtenson
2016-04-09 03:38:57 UTC
Permalink
On 6 April 2016 at 16:46, Adam SjÞgren <***@koldfront.dk> wrote:

* elide all "full-bottom-quoted" emails, preferably with a line for
Post by Adam Sjøgren
each, togglable,
or
* reformat an email containing a thread of emails full-bottom-quoted
into the "correct" format (top quoted)
I guess the latter isn't that useful, but sometimes I reformat threads
to make them understandable.
Fair enough (and yes, I'm aware of the fact that I made a mistake with my
previous message).

The first suggestion is what Gmail is doing, I believe, and it seems to
work quite well.

The second suggestion is not really workable. Anyone who has been working
in an organisation that uses Outlook extensively (like where I work) knows
that the chains become very long, and reformatting to put the entire
message (or even message chain) on top would make it incredibly difficult
to read.

My tool does not address this at all. In fact, using shr to render the HTML
Outlook emails works really well in almost all cases, and for the remaining
ones all you need to do is to press K H to render it in a browser.

My tool ensures that the reply chain is preserved when you reply. Believe
it or not, but in many companies, when someone wants to inform another
person of a previous discussion, he simply forwards the email to the
recipient, and the entire chain is there for him. Thus, you need to make
sure that no matter how you write your mails, you need to ensure that the
previous chain is preserved, including inline images etc. That is what my
tool does.

I'm brining this up here, because I feel that this functionality should be
part of Gnus. However, my tool is not suitable for this, due to the fact
that it does the HTML rewriting using an external program. If there was an
Elisp implementation of a parser that supports the HTML→DOM→Edit→DOM→HTML
workflow, I'd be happy to implement it.

Regards,
Elias
Adam Sjøgren
2016-04-09 09:33:53 UTC
Permalink
Post by Elias MÃ¥rtenson
Post by Adam Sjøgren
* reformat an email containing a thread of emails full-bottom-quoted
into the "correct" format (top quoted)
I guess the latter isn't that useful, but sometimes I reformat threads
to make them understandable.
Fair enough (and yes, I'm aware of the fact that I made a mistake with my
previous message).
(I hope you took the comment tongue-in-cheek, as it was meant. It is
very easy to get used to doing "Outlook"-quoting).
Post by Elias MÃ¥rtenson
The first suggestion is what Gmail is doing, I believe, and it seems to
work quite well.
Yes, that must be where I have seen it.
Post by Elias MÃ¥rtenson
The second suggestion is not really workable.
That's what I meant by it being less useful - only in cases like this
thread, it can be used. And maybe on some technical mailing lists.
Post by Elias MÃ¥rtenson
Anyone who has been working in an organisation that uses Outlook
extensively (like where I work) knows that the chains become very
long, and reformatting to put the entire message (or even message
chain) on top would make it incredibly difficult to read.
Yes, you would have to trim and interleave the quotes as well, which
would make the functionality less useful.
Post by Elias MÃ¥rtenson
My tool does not address this at all.
Indeed - every time your tool is mentioned, I think: "Oooh, nice!", and
then I read what it does, and remember that it isn't really what *I*
need; which I why I brought up the two other functionalities.
Post by Elias MÃ¥rtenson
In fact, using shr to render the HTML Outlook emails works really well
in almost all cases, and for the remaining ones all you need to do is
to press K H to render it in a browser.
I know, I work in a place where everybody but me and a handful of other
people use Outlook.

I don't have any problems with them, when I reply "top quote"-style with
Post by Elias MÃ¥rtenson
My tool ensures that the reply chain is preserved when you reply.
How it this different from a normal Reply in Gnus, where you add your
text at the top?
Post by Elias MÃ¥rtenson
Believe it or not, but in many companies, when someone wants to inform
another person of a previous discussion, he simply forwards the email
to the recipient, and the entire chain is there for him.
I think, sadly, that this is every company by now.

As a matter of principle, I still trim excessive .signatures etc. from
such emails, but I have given up teaching everybody how to use email.
Post by Elias MÃ¥rtenson
Thus, you need to make sure that no matter how you write your mails,
you need to ensure that the previous chain is preserved, including
inline images etc. That is what my tool does.
I guess this is where my colleages and yours differ, nobody uses inline
images and formatting enough to expect them to be preserved at "my" place.

Or maybe they are too polite to complain to me.
Post by Elias MÃ¥rtenson
I'm brining this up here, because I feel that this functionality should be
part of Gnus.
I don't think Gnus supports, directly, anything but *display* of HTML emails?


Best regards,

Adam
--
"Va' kallt det är.." Adam Sjøgren
"Mmmh? Det brukar det vara om vintern!" ***@koldfront.dk
Adam Sjøgren
2016-04-09 09:37:01 UTC
Permalink
Post by Adam Sjøgren
As a matter of principle, I still trim excessive .signatures etc. from
such emails, but I have given up teaching everybody how to use email.
There ought to be a name for this, like the eternal september...


Best regards,

Adam
--
"Apparantly I was misinformed." Adam Sjøgren
***@koldfront.dk
Lars Ingebrigtsen
2018-04-10 22:01:51 UTC
Permalink
Post by Elias MÃ¥rtenson
I'm brining this up here, because I feel that this functionality should be
part of Gnus.
Yes, it sounds very useful.
Post by Elias MÃ¥rtenson
However, my tool is not suitable for this, due to the fact that it
does the HTML rewriting using an external program. If there was an
Elisp implementation of a parser that supports the
HTML→DOM→Edit→DOM→HTML workflow, I'd be happy to implement it.
Hm... Well, Emacs can parse HTML, and can mutate the DOM (with dom.el),
and it can print the DOM out again (as HTML), so I basically think Emacs
can do this all now? (I realise I'm replying to a two year old email.
:-))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Jordan Wilson
2018-04-14 11:38:40 UTC
Permalink
Post by Jordan Wilson
I have been trying to forward HTML email (*makes the sign of the
cross*).
I want to have Gnus treat the email content "in the standard way",
i.e. have the HTML content inline (not as an attachment), and renderable
by non-Gnus email clients.
My fiddlings with `message-forward-as-mime' and
`message-forward-show-mml' has got me as far as having the
HTML message inline, but the HTML is unrendered on the other end.
Is there a simple way of doing this using Gnus?
I completely forgot about this thread, until just now seeing Lars's reply.

I ended up hacking together this very ugly function (more of a
script). I imagine it would have been trivial to implement this
properly, but didn't have the time to look at Gnus' internals. It works
most of the time in the way that I wanted.
Lars Ingebrigtsen
2018-04-14 18:00:58 UTC
Permalink
Post by Jordan Wilson
I ended up hacking together this very ugly function (more of a
script). I imagine it would have been trivial to implement this
properly, but didn't have the time to look at Gnus' internals. It works
most of the time in the way that I wanted.
Hm, I see... Yes, something along those lines looks like the right
idea.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Loading...