lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev lynx won't browse .cc files, only offers to download


From: Ed Doolittle
Subject: lynx-dev lynx won't browse .cc files, only offers to download
Date: Tue, 14 Jul 1998 13:02:25 -0400 (EDT)

Recap of Debian bug report for the benefit of address@hidden:

I reported a "bug" in the Debian version of Lynx.  Debian has a mime type
for c++ code:

        /etc/mime.types:text/x-c++src                   cpp cxx cc

address@hidden wrote:

>> Package: lynx
>> Version: 2.8-2

>> While browsing through some Debian documentation [with lynx], I found I
>> couldn't browse a .cc file, I could only download it.  Adding the line
>> 
>>      text/x-c++src; /usr/bin/less %s; needsterminal; \
>>        description=C++ Program Text; nametemplate=%s.cc
>> 
>> to /etc/mailcap seems to help.  Is there a way I can do this with just
>> lynx alone?

Martin Schulze <address@hidden> replied:

> a) This is territory of mime-support.

My "solution" would be in the territory of mime-support, but it really isn't 
a proper solution because it calls an external viewer where none is
necessary.  It ought to be done with lynx alone, in my opinion.

> b) lynx might be able to use a local .mailcap file.  I'm not sure.

Yes, that would be nice if I had a super-c++ viewer with highlighting, etc.
But I (and I'm sure others) just want to browse the file and search for
keywords.  I don't want to have to start up less/xless just to see the
file.

Lynx will have to be modified to do this.  This is what I suggest: add
support for lynx to parse lines in lynx.cfg that look like this:

        VIEWER:text/x-c++src:INTERNAL

which will cause lynx to view the file "as-is", like netscape does.  (This
does not actually work, and as far as I can tell from browsing the lynx
source, there is no support for an "internal" viewer, so support would have
to be added.)

Alternatively, support for conversion of mime types (specifically
downgrading from text/x-c++src to text/plain) could be added to lynx.
(There seems to be some conversion code in HTInit.c but I can't make much
sense of it ... it seems to go backward from HTML to C.)

It would be nice to make the conversion configurable in lynx.cfg.

Apologies if I'm missing something in lynx.  I just had a quick look through 
the source.

Ed

reply via email to

[Prev in Thread] Current Thread [Next in Thread]