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

Re: mime_lookup



On 2004-06-03, Chris Green <chris@xxxxxxxxxxx> wrote:
> On Thu, Jun 03, 2004 at 10:38:49AM -0500, Patrick Shanahan wrote:
> > * Chris Green <chris@xxxxxxxxxxx> [06-03-04 10:11]:
> > > On Thu, Jun 03, 2004 at 09:26:32AM -0500, Patrick Shanahan wrote:
> > > > * Chris Green <chris@xxxxxxxxxxx> [06-03-04 08:52]:
> > > > 
> > > > application/[put mime-type here]; octet-filter %s; copiousoutput
> > > > 
> > > Er, yes, but that's just what I'm asking - what do I put where you've
> > > said "put mime-type here"?  Is it just 'text'?
> > 
> > No, you are viewing the file now as 'text', if I understood you
> > correctly.  AIUI, your log file is *not* text?  But you do not explain
> > what format the file is.  That format will indicate the 'mime-type'.
> > 
> The log files appear as follows when I 'v'iew attachments:-
> 
>     fserror.log                      [applica/octet-stre, base64, 33K]
> 
> So what do I put in .mailcap to handle this?  It appears to be handled
> automatically by default anyway, except for the warning message about
> being assumed to be text.

You shouldn't need a special entry in your mailcap for text/plain
since mutt handles that type internally.  However, you do need an
entry in ~/.mime.types like this to associate the .log extension
with content-type text/plain:

text/plain                              txt     log

> > > > application/octet-stream; /<file-location>/<.mutt.octet.filter> %s; 
> > > > copiousoutput
> > > > 
> > > > I believe that .mutt.octet.filter must be executable.
> > > 
> > > ... and I thought that I didn't need mutt.octet.filter any more now
> > > that I'm using mime_lookup.  If I do need it still what has
> > > mime_lookup gained me?
> >  
> > mutt.octet.filter, as I understand it, displays files based on their
> > extension like m$ does rather than their content.  Your choice, but
> > you must still associate a file type/definition for either to work.
> > 
> As I understand it using mime_lookup in my muttrc is a replacement for
> using mutt.octet.filter.  Is that not right?

Yes, that's right.  If you're using mime_lookup, you don't need
mutt.octet.filter any more.

Regards,
Gary

-- 
Gary Johnson                               | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx                   | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA