combined html/ascii message: mutt shows html but not ascii

This is a discussion on combined html/ascii message: mutt shows html but not ascii within the Mutt forums in Other Technologies category; Dear all, one in a while I get email messages in html. mutt displays them fine by piping it through lynx, although this looses some formatting. But then I sometimes get emails which have the same content twice: once in plain ascii, one in html. Here, mutt also uses the html content. How can I configure mutt to take the ascii content instead? Thanks, Ulrich...

Go Back   Application Development Forum > Other Technologies > Mutt

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-12-2008, 11:08 AM
Ulrich Scholz
Guest
 
Default combined html/ascii message: mutt shows html but not ascii

Dear all,

one in a while I get email messages in html. mutt displays them fine
by piping it through lynx, although this looses some formatting.

But then I sometimes get emails which have the same content twice:
once in plain ascii, one in html. Here, mutt also uses the html
content.

How can I configure mutt to take the ascii content instead?

Thanks,

Ulrich
Reply With Quote
  #2  
Old 08-12-2008, 11:36 AM
Christian Ebert
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

* Ulrich Scholz on Tuesday, August 12, 2008:
> But then I sometimes get emails which have the same content twice:
> once in plain ascii, one in html. Here, mutt also uses the html
> content.
>
> How can I configure mutt to take the ascii content instead?


Have a look at the alternative_order command (not variable)

eg.

alternative_order text/plain text/html

prefers text/plain over text/html.

c
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]

_F R E E_ _V I D E O S_ -->> http://www.blacktrash.org/underdogma/
Reply With Quote
  #3  
Old 08-12-2008, 12:08 PM
Grant Edwards
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

On 2008-08-12, Christian Ebert <blacktrash@gmx.net> wrote:
> * Ulrich Scholz on Tuesday, August 12, 2008:
>> But then I sometimes get emails which have the same content twice:
>> once in plain ascii, one in html. Here, mutt also uses the html
>> content.
>>
>> How can I configure mutt to take the ascii content instead?

>
> Have a look at the alternative_order command (not variable)
>
> eg.
>
> alternative_order text/plain text/html
>
> prefers text/plain over text/html.


The problem is that no matter what order you pick, it's wrong
half the time.

I have text/html viewing configured to use w3m -dump (or maybe
it's links, I forget). For about half of the e-mail I get,
that's much more readable than the text/plain alternate. The
other half of the time, the plain-text alternate is definitely
better.

--
Grant Edwards grante Yow! I'm thinking about
at DIGITAL READ-OUT systems
visi.com and computer-generated
IMAGE FORMATIONS ...
Reply With Quote
  #4  
Old 08-12-2008, 04:25 PM
Christian Ebert
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

* Grant Edwards on Tuesday, August 12, 2008:
> On 2008-08-12, Christian Ebert <blacktrash@gmx.net> wrote:
>> alternative_order text/plain text/html
>>
>> prefers text/plain over text/html.

>
> The problem is that no matter what order you pick, it's wrong
> half the time.


You're so right, heh.

> I have text/html viewing configured to use w3m -dump (or maybe
> it's links, I forget). For about half of the e-mail I get,
> that's much more readable than the text/plain alternate. The
> other half of the time, the plain-text alternate is definitely
> better.


So how about a macro that toggles the settings:

# toggle alternative_order
macro pager ,@aoh= "\
<enter-command> unalternative_order *; \
alternative_order text/enriched text/html text/plain text application/postscript image/*; \
macro pager A ,@aot= 'toggle alternative order'<enter>\
<exit><display-message>"
#
macro pager ,@aot= "\
<enter-command> unalternative_order *; \
alternative_order text/enriched text/plain text/html text application/postscript image/*; \
macro pager A ,@aoh= 'toggle alternative order'<enter>\
<exit><display-message>"
#
macro pager A ,@aot= "toggle alternative order"


c
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]

_F R E E_ _V I D E O S_ -->> http://www.blacktrash.org/underdogma/
Reply With Quote
  #5  
Old 08-12-2008, 04:30 PM
Grant Edwards
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

On 2008-08-12, Christian Ebert <blacktrash@gmx.net> wrote:
> * Grant Edwards on Tuesday, August 12, 2008:
>> On 2008-08-12, Christian Ebert <blacktrash@gmx.net> wrote:
>>> alternative_order text/plain text/html
>>>
>>> prefers text/plain over text/html.

>>
>> The problem is that no matter what order you pick, it's wrong
>> half the time.

>
> You're so right, heh.
>
>> I have text/html viewing configured to use w3m -dump (or maybe
>> it's links, I forget). For about half of the e-mail I get,
>> that's much more readable than the text/plain alternate. The
>> other half of the time, the plain-text alternate is definitely
>> better.

>
> So how about a macro that toggles the settings:
>
> # toggle alternative_order
> macro pager ,@aoh= "\
><enter-command> unalternative_order *; \
> alternative_order text/enriched text/html text/plain text application/postscript image/*; \
> macro pager A ,@aot= 'toggle alternative order'<enter>\
><exit><display-message>"
> #
> macro pager ,@aot= "\
><enter-command> unalternative_order *; \
> alternative_order text/enriched text/plain text/html text application/postscript image/*; \
> macro pager A ,@aoh= 'toggle alternative order'<enter>\
><exit><display-message>"
> #
> macro pager A ,@aot= "toggle alternative order"


Cool. I've been intending to write something like that!


--
Grant Edwards grante Yow! RELATIVES!!
at
visi.com
Reply With Quote
  #6  
Old 08-12-2008, 05:07 PM
Troy Piggins
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

* Christian Ebert wrote :
> * Grant Edwards on Tuesday, August 12, 2008:
>> On 2008-08-12, Christian Ebert <blacktrash@gmx.net> wrote:
>>> alternative_order text/plain text/html
>>>
>>> prefers text/plain over text/html.

>>
>> The problem is that no matter what order you pick, it's wrong
>> half the time.

>
> You're so right, heh.
>
>> I have text/html viewing configured to use w3m -dump (or maybe
>> it's links, I forget). For about half of the e-mail I get,
>> that's much more readable than the text/plain alternate. The
>> other half of the time, the plain-text alternate is definitely
>> better.

>
> So how about a macro that toggles the settings:
>
> # toggle alternative_order
> macro pager ,@aoh= "\
> <enter-command> unalternative_order *; \
> alternative_order text/enriched text/html text/plain text application/postscript image/*; \
> macro pager A ,@aot= 'toggle alternative order'<enter>\
> <exit><display-message>"
> #
> macro pager ,@aot= "\
> <enter-command> unalternative_order *; \
> alternative_order text/enriched text/plain text/html text application/postscript image/*; \
> macro pager A ,@aoh= 'toggle alternative order'<enter>\
> <exit><display-message>"
> #
> macro pager A ,@aot= "toggle alternative order"


Nice work, Christian!

--
Troy Piggins | http://piggo.com/~troy _ /|/
|\__/ Oo,
( \\ D
Mutt 1.5.18 (with rr.compressed & vvv.nntp patches) L\-\L`\/|
Reply With Quote
  #7  
Old 08-12-2008, 05:45 PM
Christian Ebert
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

* Troy Piggins on Tuesday, August 12, 2008:
> Nice work, Christian!


thx. Now you'll be punished because I share another one which is
OT. It "emulates" slrn's zoom_article_window (bound to "z" by
default):

#v+
# toggle index display in pager
macro pager ,@inds "\
<enter-command> set pager_index_lines=`expr $(tput lines) / 7`; \
macro pager z ,@indh 'show/hide index'<enter>"
#
macro pager ,@indh "\
<enter-command> set pager_index_lines=0; \
macro pager z ,@inds 'hide/show index'<enter>"
#
macro pager z ,@indh "hide/show index"
#v-

You might have to reverse it; I have set pager_index_lines at
startup.

c
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]

_F R E E_ _V I D E O S_ -->> http://www.blacktrash.org/underdogma/
Reply With Quote
  #8  
Old 08-12-2008, 06:21 PM
Troy Piggins
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

* Christian Ebert wrote :
> * Troy Piggins on Tuesday, August 12, 2008:
>> Nice work, Christian!

>
> thx. Now you'll be punished because I share another one which is
> OT. It "emulates" slrn's zoom_article_window (bound to "z" by
> default):
>
> #v+
> # toggle index display in pager
> macro pager ,@inds "\
> <enter-command> set pager_index_lines=`expr $(tput lines) / 7`; \
> macro pager z ,@indh 'show/hide index'<enter>"
> #
> macro pager ,@indh "\
> <enter-command> set pager_index_lines=0; \
> macro pager z ,@inds 'hide/show index'<enter>"
> #
> macro pager z ,@indh "hide/show index"
> #v-
>
> You might have to reverse it; I have set pager_index_lines at
> startup.


I like it. It's been a while since I played with my mutt setup
and macros. I'm inspired once more

--
Troy Piggins | http://piggo.com/~troy _ /|/
|\__/ Oo,
( \\ D
Mutt 1.5.18 (with rr.compressed & vvv.nntp patches) L\-\L`\/|
Reply With Quote
  #9  
Old 08-13-2008, 04:44 AM
Ulrich Scholz
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

Thanks for your macros. But how do they work?

First of all, a verbatim copy to .muttrc gave an error: i had do
remove the "\ (linebreak)", so everything is in one line. But then,
"A" is still unbound.

Ulrich

On Aug 12, 10:25*pm, Christian Ebert <blacktr...@gmx.net> wrote:
> * Grant Edwards on Tuesday, August 12, 2008:


> So how about a macro that toggles the settings:
>
> # toggle alternative_order
> macro pager ,@aoh= "\
> <enter-command> unalternative_order *; \
> alternative_order text/enriched text/html text/plain text application/postscript image/*; \
> macro pager A ,@aot= 'toggle alternative order'<enter>\
> <exit><display-message>"
> #
> macro pager ,@aot= "\
> <enter-command> unalternative_order *; \
> alternative_order text/enriched text/plain text/html text application/postscript image/*; \
> macro pager A ,@aoh= 'toggle alternative order'<enter>\
> <exit><display-message>"
> #
> macro pager A ,@aot= "toggle alternative order"


Reply With Quote
  #10  
Old 08-13-2008, 04:59 AM
Christian Ebert
Guest
 
Default Re: combined html/ascii message: mutt shows html but not ascii

* Ulrich Scholz on Wednesday, August 13, 2008:
> Thanks for your macros. But how do they work?


By pressing "A".

> First of all, a verbatim copy to .muttrc gave an error: i had do
> remove the "\ (linebreak)", so everything is in one line.


Well, make sure there are no copy'n paste errors (spaces after \
etc.). Here it /does/ work.

> But then, "A" is still unbound.


Have you tried in the pager? But my guess would be a copy'n paste
issue. What mutt version?

c
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting. [TOFU := text oben, followup unten]
Q: What is the most annoying thing in email and on usenet?
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:18 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.