[elinks-users] mime types/mailcap problem in 0.5pre6

Jonas Fonseca fonseca at diku.dk
Sat Oct 11 10:28:43 PDT 2003

Jean-Yves Levesque <jyves at nortelnetworks.com> wrote Mon, Oct 06, 2003:
> On Tue, Oct 07, 2003 at 12:58:10AM +0200, Jonas Fonseca wrote:
> > Jean-Yves Levesque <jyves at nortelnetworks.com> wrote Mon, Oct 06,
> > 2003:
> > > I am trying to view a jpeg image from elinks using 0.5pre6.  It
> > > always tells me the type is unknown (image/jpeg) even though the
> > > type is set correctly. This works fine with 0.4.x. The latest CVS
> > > snapshot (Oct. 06) is also showing the same behaviour. Is there
> > > something missing ? I have not seen anything on the archive.
> > 
> > You mention you have used 0.4.x before. It could maybe be a problem
> > with the renaming of the mailcap options. Could you maybe grep for
> > your mailcap options in ~/.elinks/elinks.conf and feed them back ..
> > also maybe try to test it with a new elinks.conf file[0] and see if
> > the behaviour is still there?
> 	I did removed my .elinks directory just to be sure. No change.
> 	I did try to disable and enable it but did not see any change.
> 	Still works with the 0.4 branch.

Strange .. It works for me ..

You didn't configure using --disable-mailcap ?

My settings:

[19:13:18]fonseca at galar:~ > grep image ~/.mailcap
image/*;                xv %s ; test=test -n "$DISPLAY";

[19:13:56]fonseca at galar:~ > grep -E "set .*mailcap" .elinks/elinks.conf
    set mime.mailcap.enable = 1
    set mime.mailcap.path = ""
    set mime.mailcap.ask = 1
    set mime.mailcap.description = 0
    set mime.mailcap.prioritize = 1

What are your settings?

> > I did some changes recently so that the mailcap files are only
> > loaded when necesary. Iwouldn.t say it is very well tested but it
> > works for me so I doubt this can be the cause.
> 	Maybe but how do we know the mailcap is loaded?

There's currently no way to know that. You could insert a debug
statement in the code. Open src/mime/backend/mailcap.c and find the
function named parse_mailcap_file() starting around line 270. Find the
line with

	if (!file) return;

and after it add

	debug("Loading file %s", filename);

> > [0] You can use the recently added -confdir parameter:
> >     -confdir <str>        Set config dir to given string.
> 	Do not see it in pre6, neither in Oct 06 build.

Hmm ok sorry ... but it should be in pre7 ;)

> 	On another note, the pre6 source does not contain the
> 	palette.inc file. Had to copy it from the oct 06 build.

Yes that has been fixed in CVS but only daily generated tarballs should
be ok.

Jonas Fonseca

More information about the elinks-users mailing list