Gnus development mailing list
 help / color / mirror / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: "Jorge A. Alfaro-Murillo" <jorge.alfaro-murillo@yale.edu>,
	Emanuel Berg <moasen@zoho.com>,
	Andreas Schwab <schwab@linux-m68k.org>
Cc: ding@gnus.org
Subject: Re: Never automatically display HTML in an email
Date: Tue, 05 Jun 2018 21:42:27 -0700	[thread overview]
Message-ID: <87po14o79o.fsf_-_@gmail.com> (raw)
In-Reply-To: <87bmcpfe7x.fsf@yale.edu> (Jorge A. Alfaro-Murillo's message of "Tue, 05 Jun 2018 11:24:50 -0400, Tue, 05 Jun 2018 17:33:28 +0200, Tue, 05 Jun 2018 21:01:16 +0200")

[-- Attachment #1: Type: text/plain, Size: 3088 bytes --]

Hi Jorge, Emanuel, and Andreas,

Thank you for the replies!

"Jorge A. Alfaro-Murillo" <jorge.alfaro-murillo@yale.edu> writes:

> I think gnus-article-browse-html-article uses browse-url, you might
> want to change the browse-url-browser-function to something like
> browse-url-w3. IceCat is probably what the function
> browse-url-default-browser thinks is the suitable browser.

Yes, that seems to be what's going on.  It makes sense!

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Jun 05 2018, Chris Marusich <cmmarusich@gmail.com> wrote:
>
>> This allows me to view the HTML in an external browser by typing "K H"
>> (gnus-article-browse-html-article), which is quite nice.  However, when
>> I type RET (gnus-article-press-button), it displays the HTML in-line,
>> instead of rendering it.
>
> You can do that with "i" (gnus-article-inline-part).

Perfect!  I missed this somehow.  Thank you for pointing it out to me.

Emanuel Berg <moasen@zoho.com> writes:

> Don't forget to post here when and how you (the
> OP) finally get it to work!

In sum, the configuration I decided to use in the end was the following:

* Put "text/html" in the mm-inline-override-type list.  Since for me it
  was empty to begin with, I just did this:

      (setq mm-inline-override-types '("text/html"))

  This seems to inhibit the automatic display of HTML parts in all email
  I receive, no matter where those HTML parts appear.  Instead of being
  displayed, they show up as attachments.  Note that I put buttons on
  ALL my MIME types to begin with (i.e., I set
  gnus-inhibit-mime-unbuttonizing to t and gnus-buttonized-mime-types to
  nil), so you might also need to make sure buttons are always shown if
  you want to duplicate the configuration I have.

* I also discourage Gnus from displaying HTML alternatives, which makes
  it so that Gnus automatically displays the text/plain alternative when
  the email has text/plain and a text/html alternatives:

      (setq mm-discouraged-alternatives '("text/html" "text/richtext"))

With the above configuration, the following appears (so far) to be true
for any email I receive that has an HTML part (regardless of whether it
is an alternative part in a multipart/alternative email, or it is the
only part in the email):

* HTML parts are not displayed automatically.  They always show up as a
  button, and I have to manually press the button (by moving point over
  it and typing RET) to view it.  Even when I do that, the displayed
  contents are the raw HTML - it is not rendered.

* I can render the HTML part in-line by pressing "i" while point is on
  the button.

* I can render the HTML part externally by pressing "K H" while point is
  on the button.

This is pretty much exactly how I wanted it to be, since it allows me to
control when Gnus will render the HTML part, and I can prevent Gnus from
rendering it until after I have inspected the HTML to verify that
nothing obviously crazy is going on.  And it's pretty painless.

Thank you!

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2018-06-06  4:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01  4:02 Chris Marusich
2018-06-01  8:00 ` Malcolm Purvis
2018-06-05  7:27   ` Chris Marusich
2018-06-05 15:24     ` Jorge A. Alfaro-Murillo
2018-06-05 15:33       ` Emanuel Berg
2018-06-06  4:42       ` Chris Marusich [this message]
2018-06-06 16:58         ` Eric Abrahamsen
2018-06-06 17:37           ` Emanuel Berg
2018-06-06 18:06             ` Eric Abrahamsen
2018-06-06 18:41               ` Emanuel Berg
2018-06-06 18:51                 ` Eric Abrahamsen
2018-06-05 19:01     ` Andreas Schwab
2018-06-01  8:05 ` Andreas Schwab
2018-06-01  9:27   ` Adam Sjøgren
2018-06-01 11:56 ` Emanuel Berg

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=87po14o79o.fsf_-_@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=ding@gnus.org \
    --cc=jorge.alfaro-murillo@yale.edu \
    --cc=moasen@zoho.com \
    --cc=schwab@linux-m68k.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;
as well as URLs for NNTP newsgroup(s).