Gnus development mailing list
 help / color / mirror / Atom feed
* bah, i've had it with html
@ 2001-07-26 22:47 Brian Edmonds
  2001-07-26 23:45 ` Colin Walters
  0 siblings, 1 reply; 19+ messages in thread
From: Brian Edmonds @ 2001-07-26 22:47 UTC (permalink / raw)


Ok, is there a reasonably straightforward way to tell Gnus (5.8.6
currently here) that I never want it to render HTML?  Ever?  If I get a
message in which the only content is in HTML, I'd rather see the HTML
source.

Brian.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-26 22:47 bah, i've had it with html Brian Edmonds
@ 2001-07-26 23:45 ` Colin Walters
  2001-07-27  5:24   ` Brian Edmonds
  0 siblings, 1 reply; 19+ messages in thread
From: Colin Walters @ 2001-07-26 23:45 UTC (permalink / raw)


Brian Edmonds <brian@gweep.ca> writes:

> Ok, is there a reasonably straightforward way to tell Gnus (5.8.6
> currently here) that I never want it to render HTML?  Ever?  If I
> get a message in which the only content is in HTML, I'd rather see
> the HTML source.

>From my ~/.gnus file:

(setq mm-automatic-display (remove "text/html" mm-automatic-display))


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-26 23:45 ` Colin Walters
@ 2001-07-27  5:24   ` Brian Edmonds
  2001-07-27  9:07     ` Kai Großjohann
  2001-07-27 12:03     ` Itai Zukerman
  0 siblings, 2 replies; 19+ messages in thread
From: Brian Edmonds @ 2001-07-27  5:24 UTC (permalink / raw)


Colin Walters <walters@cis.ohio-state.edu> writes:
>> Ok, is there a reasonably straightforward way to tell Gnus (5.8.6
>> currently here) that I never want it to render HTML?  Ever?
> From my ~/.gnus file:
> (setq mm-automatic-display (remove "text/html" mm-automatic-display))

Many thanks, this works great!  Nothing against w3, which I have used
happily for various actual web browsing, I just wince every time it gets
started up for a piece of email.

Brian.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27  5:24   ` Brian Edmonds
@ 2001-07-27  9:07     ` Kai Großjohann
  2001-07-27 12:34       ` Bill White
  2001-07-27 15:44       ` Stainless Steel Rat
  2001-07-27 12:03     ` Itai Zukerman
  1 sibling, 2 replies; 19+ messages in thread
From: Kai Großjohann @ 2001-07-27  9:07 UTC (permalink / raw)
  Cc: ding

On 26 Jul 2001, Brian Edmonds wrote:

> Many thanks, this works great!  Nothing against w3, which I have
> used happily for various actual web browsing, I just wince every
> time it gets started up for a piece of email.

I'm happy with this:

(add-to-list 'mm-discouraged-alternatives "text/html")

Often, HTML messages have a text/plain alternative.

kai
-- 
~/.signature: No such file or directory


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27  5:24   ` Brian Edmonds
  2001-07-27  9:07     ` Kai Großjohann
@ 2001-07-27 12:03     ` Itai Zukerman
  2001-07-27 14:46       ` Simon Josefsson
  1 sibling, 1 reply; 19+ messages in thread
From: Itai Zukerman @ 2001-07-27 12:03 UTC (permalink / raw)


I asked this before but didn't get any response.

Does anyone have any idea why (without w3) text/html attachments are
displayed as source at first, but if I press the attachment button
twice Gnus invokes mm-display-part which (correctly) uses mailcap for
display?  Why isn't mm-display-part used the first time?

(I get the feeling that there are two different MIME handling
mechanisms buried in Gnus, and I can't quite follow the code...)

This is with CVS gnus from 2001.07.04, and Emacs 20.7.

-- 
Itai Zukerman  <http://www.math-hat.com/~zukerman/>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27  9:07     ` Kai Großjohann
@ 2001-07-27 12:34       ` Bill White
  2001-07-27 13:19         ` Brian Edmonds
                           ` (3 more replies)
  2001-07-27 15:44       ` Stainless Steel Rat
  1 sibling, 4 replies; 19+ messages in thread
From: Bill White @ 2001-07-27 12:34 UTC (permalink / raw)
  Cc: Brian Edmonds, ding

On Fri Jul 27 2001 at 04:07, Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) said:

    > On 26 Jul 2001, Brian Edmonds wrote:
    > 
>> Many thanks, this works great!  Nothing against w3, which I have
>> used happily for various actual web browsing, I just wince every
>> time it gets started up for a piece of email.
    > 
    > I'm happy with this:
    > 
    > (add-to-list 'mm-discouraged-alternatives "text/html")
    > 
    > Often, HTML messages have a text/plain alternative.

I've used your line above for quite a while, but I see text/plain
alternatives so rarely nowadays that it's time for something more
powerful.

When I receive an html-only message, I edit the article (`e' in the
summary buffer), then select all the html code and run an html2text[1]
script on it (`C-u M-| html2text'), then, of course, finish up with
`C-c C-c'.  Is there some way to automate that for these stupid
html-only nnml messages?

Cheers -

bw

Footnotes: 
[1] 
----------------------------------------------------------------------
#! /usr/local/bin/perl

$^W = 1;
use strict;
use POSIX   ();
use Fcntl;

my $tmp = POSIX::tmpnam();
while( ! sysopen(F, $tmp, O_WRONLY|O_EXCL|O_CREAT, 0600) ) {
    die "Attempt to open $tmp failed: $!"
        unless $! =~ "File exists";
    $tmp = POSIX::tmpnam();
}

while(<>) {
    print F;
}

close(F)
    or die "Close of $tmp failed: $!";

!system(qw(lynx -dump -force_html), $tmp)
    or die "System failed: $!";

END {
    unlink $tmp if -f $tmp;
}
----------------------------------------------------------------------

-- 
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 12:34       ` Bill White
@ 2001-07-27 13:19         ` Brian Edmonds
  2001-07-27 13:46         ` Kim Minh Kaplan
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 19+ messages in thread
From: Brian Edmonds @ 2001-07-27 13:19 UTC (permalink / raw)


Bill White <billw@wolfram.com> writes:
> Is there some way to automate [html2txt] for these stupid html-only
> nnml messages?

At my last job where I was usin procmail, I added a rule to pass any
text/html or multipart/alternative messages through demime before
filing.  Simple, and worked great.

But really, all I seem to get in HTML-only is spam, and I'd rather not
bother.  I just don't want w3 loading up for something I didn't really
want to read anyways.

Brian.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 12:34       ` Bill White
  2001-07-27 13:19         ` Brian Edmonds
@ 2001-07-27 13:46         ` Kim Minh Kaplan
  2001-07-27 13:58           ` Bill White
  2001-07-27 14:07         ` Itai Zukerman
  2001-07-27 20:15         ` Kai Großjohann
  3 siblings, 1 reply; 19+ messages in thread
From: Kim Minh Kaplan @ 2001-07-27 13:46 UTC (permalink / raw)


Bill White writes:

> When I receive an html-only message, I edit the article (`e' in the
> summary buffer), then select all the html code and run an html2text[1]
> script on it (`C-u M-| html2text')

Isn't W h (M-x gnus-article-wash-html) good enough?

Kim Minh.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 13:46         ` Kim Minh Kaplan
@ 2001-07-27 13:58           ` Bill White
  0 siblings, 0 replies; 19+ messages in thread
From: Bill White @ 2001-07-27 13:58 UTC (permalink / raw)
  Cc: ding

On Fri Jul 27 2001 at 08:46, Kim Minh Kaplan <kaplan@kim-minh.com> said:

    > Bill White writes:
    > 
>> When I receive an html-only message, I edit the article (`e' in the
>> summary buffer), then select all the html code and run an
>> html2text[1] script on it (`C-u M-| html2text')
    > 
    > Isn't W h (M-x gnus-article-wash-html) good enough?

No - it uses w3.

Cheers -

bw
-- 
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 12:34       ` Bill White
  2001-07-27 13:19         ` Brian Edmonds
  2001-07-27 13:46         ` Kim Minh Kaplan
@ 2001-07-27 14:07         ` Itai Zukerman
  2001-07-27 14:38           ` Bill White
  2001-07-27 20:15         ` Kai Großjohann
  3 siblings, 1 reply; 19+ messages in thread
From: Itai Zukerman @ 2001-07-27 14:07 UTC (permalink / raw)
  Cc: Kai Großjohann, Brian Edmonds, ding

> When I receive an html-only message, I edit the article (`e' in the
> summary buffer), then select all the html code and run an html2text[1]
> script on it (`C-u M-| html2text'), then, of course, finish up with
> `C-c C-c'.  Is there some way to automate that for these stupid
> html-only nnml messages?

Perhaps you can convince Gnus to use mailcap.  Some potential mailcap entries:

  text/html; /usr/bin/html2text '%s'; copiousoutput
  text/html; /usr/bin/links -dump '%s'; copiousoutput

mm-display part seems to handle this properly (when w3 *isn't*
installed, anyway); see my other post in this thread.

This seems more elegant that putting text/html-specific code in Gnus.

(Or, maybe I don't know what I'm talking about...)

-- 
Itai Zukerman  <http://www.math-hat.com/~zukerman/>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 14:07         ` Itai Zukerman
@ 2001-07-27 14:38           ` Bill White
  0 siblings, 0 replies; 19+ messages in thread
From: Bill White @ 2001-07-27 14:38 UTC (permalink / raw)
  Cc: Brian Edmonds, ding

On Fri Jul 27 2001 at 09:07, Itai Zukerman <zukerman@math-hat.com> said:

>> When I receive an html-only message, I edit the article (`e' in the
>> summary buffer), then select all the html code and run an
>> html2text[1] script on it (`C-u M-| html2text'), then, of course,
>> finish up with `C-c C-c'.  Is there some way to automate that for
>> these stupid html-only nnml messages?
    > 
    > Perhaps you can convince Gnus to use mailcap.  Some potential
    > mailcap entries:

A-ha.  (require 'mailcap)!

    >   text/html; /usr/bin/html2text '%s'; copiousoutput
    > 
    > mm-display part seems to handle this properly (when w3 *isn't*
    > installed, anyway); see my other post in this thread.
    > 
    > This seems more elegant that putting text/html-specific code in Gnus.

Excellent - the perfect solution for me.  I control when it happens,
and it works in one very well-defined area.

Thanks!

bw
-- 
Bill White                                               Office: 5E-Z15
Documentation Programmer                      Phone: 217-398-0700 x 234
Wolfram Research		                      Fax: 217-398-0747
http://members.wri.com/billw           nunc scripsi totum da mihi potum


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 12:03     ` Itai Zukerman
@ 2001-07-27 14:46       ` Simon Josefsson
  2001-07-27 15:41         ` Itai Zukerman
  0 siblings, 1 reply; 19+ messages in thread
From: Simon Josefsson @ 2001-07-27 14:46 UTC (permalink / raw)


Itai Zukerman <zukerman@math-hat.com> writes:

> Does anyone have any idea why (without w3) text/html attachments are
> displayed as source at first, but if I press the attachment button
> twice Gnus invokes mm-display-part which (correctly) uses mailcap for
> display?  Why isn't mm-display-part used the first time?

Maybe w3 throws an error the first time.  Does M-x
toggle-debug-on-error RET before viewing the article the first time
result in something useful (a backtrace)?



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 14:46       ` Simon Josefsson
@ 2001-07-27 15:41         ` Itai Zukerman
  0 siblings, 0 replies; 19+ messages in thread
From: Itai Zukerman @ 2001-07-27 15:41 UTC (permalink / raw)


Je Fri, 27 Jul 2001 16:46:15 +0200,
Simon Josefsson <jas@extundo.com> scribis:
> Itai Zukerman <zukerman@math-hat.com> writes:
> 
>> Does anyone have any idea why (without w3) text/html attachments are
>> displayed as source at first, but if I press the attachment button
>> twice Gnus invokes mm-display-part which (correctly) uses mailcap for
>> display?  Why isn't mm-display-part used the first time?
> 
> Maybe w3 throws an error the first time.  Does M-x
> toggle-debug-on-error RET before viewing the article the first time
> result in something useful (a backtrace)?

I don't have w3 installed, and there are no errors.

It seems that different code is executed the first time the content is
rendered, and when I press the text/html button twice.  But, I'm not
sure why.

Maybe a bug, maybe not.

-- 
Itai Zukerman  <http://www.math-hat.com/~zukerman/>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27  9:07     ` Kai Großjohann
  2001-07-27 12:34       ` Bill White
@ 2001-07-27 15:44       ` Stainless Steel Rat
  2001-07-27 16:42         ` Graham Murray
  2001-07-27 20:17         ` Kai Großjohann
  1 sibling, 2 replies; 19+ messages in thread
From: Stainless Steel Rat @ 2001-07-27 15:44 UTC (permalink / raw)


* Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)  on Fri, 27 Jul 2001
| Often, HTML messages have a text/plain alternative.

No, HTML messages *should* have a text/plain alternative.  These days many
do not.
-- 
Rat <ratinox@peorth.gweep.net>    \ Do not use Happy Fun Ball on concrete.
Minion of Nathan - Nathan says Hi! \ 
PGP Key: at a key server near you!  \ 



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 15:44       ` Stainless Steel Rat
@ 2001-07-27 16:42         ` Graham Murray
  2001-07-27 20:17         ` Kai Großjohann
  1 sibling, 0 replies; 19+ messages in thread
From: Graham Murray @ 2001-07-27 16:42 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> No, HTML messages *should* have a text/plain alternative.  These days many
> do not.

And even worse are those which are HTML only, but with *no* MIME
header to indicate this.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 12:34       ` Bill White
                           ` (2 preceding siblings ...)
  2001-07-27 14:07         ` Itai Zukerman
@ 2001-07-27 20:15         ` Kai Großjohann
  3 siblings, 0 replies; 19+ messages in thread
From: Kai Großjohann @ 2001-07-27 20:15 UTC (permalink / raw)
  Cc: Brian Edmonds, ding

On Fri, 27 Jul 2001, Bill White wrote:

> When I receive an html-only message, I edit the article (`e' in the
> summary buffer), then select all the html code and run an
> html2text[1] script on it (`C-u M-| html2text'), then, of course,
> finish up with `C-c C-c'.  Is there some way to automate that for
> these stupid html-only nnml messages?

Maybe w3m.el is good for you.  It lets Gnus use the external w3m
program to display HTML.  It's supposed to be fast.

kai
-- 
~/.signature: No such file or directory


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 15:44       ` Stainless Steel Rat
  2001-07-27 16:42         ` Graham Murray
@ 2001-07-27 20:17         ` Kai Großjohann
  2001-07-27 21:02           ` Stainless Steel Rat
  1 sibling, 1 reply; 19+ messages in thread
From: Kai Großjohann @ 2001-07-27 20:17 UTC (permalink / raw)
  Cc: (ding)

On Fri, 27 Jul 2001, Stainless Steel Rat wrote:

> * Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) on Fri, 27 Jul
>   2001
> | Often, HTML messages have a text/plain alternative.
> 
> No, HTML messages *should* have a text/plain alternative.  These
> days many do not.

Okay.  So, `sometimes' rather than `often'.

kai
-- 
~/.signature: No such file or directory


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 20:17         ` Kai Großjohann
@ 2001-07-27 21:02           ` Stainless Steel Rat
  2001-07-27 23:05             ` Karl Kleinpaste
  0 siblings, 1 reply; 19+ messages in thread
From: Stainless Steel Rat @ 2001-07-27 21:02 UTC (permalink / raw)


* Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)  on Fri, 27 Jul 2001
| Okay.  So, `sometimes' rather than `often'.

Current and recent versions of Eudora default to "html on" and "no text part".

AOL v6 is html only, no text at all.

Just FYI.
-- 
Rat <ratinox@peorth.gweep.net>    \ Happy Fun Ball contains a liquid core,
Minion of Nathan - Nathan says Hi! \ which, if exposed due to rupture, should
PGP Key: at a key server near you!  \ not be touched, inhaled, or looked at.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: bah, i've had it with html
  2001-07-27 21:02           ` Stainless Steel Rat
@ 2001-07-27 23:05             ` Karl Kleinpaste
  0 siblings, 0 replies; 19+ messages in thread
From: Karl Kleinpaste @ 2001-07-27 23:05 UTC (permalink / raw)


[-- Attachment #1: Type: text/html, Size: 1031 bytes --]

[-- Attachment #2: Type: text/plain, Size: 771 bytes --]

Stainless Steel Rat <ratinox@peorth.gweep.net> writes:
> Current and recent versions of Eudora default to "html on" and "no
> text part".

Just another FYI, Eudora is particularly broken as regards handling
multipart/alternative.

This message is mp/alt.  It contains a text/html part *first*, and
text/plain *last*.  That means that every MUA on the planet should
render the message as text/plain, because "last" means "preferred" and
every MUA can "do" text/plain.

But not Eudora.  No, silly us, how dare we presume.  You see, Eudora,
in its parental arrogance, will take such a mp/alt, wrongly display
the text/html and _*throw the text plain away*_ _*/ENTIRELY/*_.  It isn't
even /available/ to the user.

> AOL v6 is html only, no text at all.

"Hit man for hire."

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2001-07-27 23:05 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-26 22:47 bah, i've had it with html Brian Edmonds
2001-07-26 23:45 ` Colin Walters
2001-07-27  5:24   ` Brian Edmonds
2001-07-27  9:07     ` Kai Großjohann
2001-07-27 12:34       ` Bill White
2001-07-27 13:19         ` Brian Edmonds
2001-07-27 13:46         ` Kim Minh Kaplan
2001-07-27 13:58           ` Bill White
2001-07-27 14:07         ` Itai Zukerman
2001-07-27 14:38           ` Bill White
2001-07-27 20:15         ` Kai Großjohann
2001-07-27 15:44       ` Stainless Steel Rat
2001-07-27 16:42         ` Graham Murray
2001-07-27 20:17         ` Kai Großjohann
2001-07-27 21:02           ` Stainless Steel Rat
2001-07-27 23:05             ` Karl Kleinpaste
2001-07-27 12:03     ` Itai Zukerman
2001-07-27 14:46       ` Simon Josefsson
2001-07-27 15:41         ` Itai Zukerman

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).