Re: mime_lookup
On Thu, Jun 03, 2004 at 11:53:45AM -0700, Gary Johnson wrote:
> 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
>
This is what I'm after! However an entry as above doesn't seem to
work, I've tried both:-
text/plain txt log
and
text/plain; txt log
and I still get the "No matching mailcap entry found. Viewing as
text." message when I 'v'iew the .log files.
> > > > > 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.
>
Well I at least appear to have understood something right! :-)
--
Chris Green (chris@xxxxxxxxxxx)