<<< Date Index >>>     <<< Thread Index >>>

Re: attachment viewing and mailcap query



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday, December  9 at 07:49 PM, quoth Jamie Griffin:
> I got around this by putting the following in my .mutt/mailcap file:
>
> application/msword; view_attachment %s "-" '/Applications/Microsoft\ Office\ 
> 2004/Microsoft\ Word'
>
> and have a 'view_attachment' script in /usr/local/bin. This worked 
> ok, but when opening mail with a word document attached, i kept 
> getting an error-message saying:
>
> "mailcap entry application/msword not found". This frustrated me and 
> i thought my configuration must be wrong. 

It's saying that because you've most likely told mutt to auto-view 
(i.e. view inline) all MSWord documents. However, auto-viewing 
something requires a mailcap entry with the "copiousoutput" setting. 
Since you didn't have one, mutt told you it couldn't find an 
appropriate mailcap entry.

> I was able to open the attachment by pressing the 'v' key to view, 
> and selecting the attachment which then opened it with the msword 
> program. I was still bothered by the mailcap entry error i was 
> getting.

Right, because when you view an attachment *that* way, you don't need 
one with "copiousputput". To get rid of the error, all you'd have to 
do is take application/msword out of your auto_view settings.

> I then installed antiword and added the following entry into my 
> .mutt/mailcap file:
>
> "application/msword; antiword %s | more; copiousoutput; needsterminal"
>
> This does allow me to view the attachment contents,

As it would; it has the copiousoutput setting.

> but can't open the attachment with the word program. I would like to 
> do both, this is where i'm having problems. Perhaps my set up is 
> wrong?

You mean the first setting no longer works? Probably because mutt 
interprets the mailcap linearly, and uses the FIRST ACCEPTABLE entry. 
If the copiousoutput entry is first, then it will be used for 
everything. If the other entry is first, it will be used when 
copiousoutput is not required, but will be skipped when copiousoutput 
IS required.

~Kyle
- -- 
Where all men think alike, no one thinks very much.
                                                     -- Walter Lippmann
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFHXGwVBkIOoMqOI14RAtmXAKDyFtRNydoOZ2LV+ySjw3p6y4xNHACfQDZp
0Hnm49UBzBGW/LrL0QTO59k=
=e/B2
-----END PGP SIGNATURE-----