Package: zgv
Version: 5.9-2
Tags: patch

Hello,

a long time ago the mailcap entries supplied by zgv stopped working.
They don't work on plain consoles neither with lynx nor with mutt.
They do work with lynx and mutt in screen consoles.
I confess, I did ignore that problem a long time in the hope that
somebody else would care :) However, since nobody did, I finally had a
dive into it.

The patch attached contains a set of working mailcap entries. They do
work with double- instead of single escapes. They do work with both -
plain consoles as well as consoles within screen.
I think the double-escape is needed because mailcap does a first-stage
interpretation of escape sequences itself before passing the result to
some shell.

I think the reason why the original mailcap entries in fact *did* work
with lynx and mutt in *screen* consoles is because of the second test
in the mailcap entries against $STY. STY is not set in plain consoles
but it is set in screen consoles. However, I personally think they did
just work because the only esacped things there were dots, where a
working escape was not so important - mailcap just made real dots out
of the escaped ones instead of passing them regex-safe.

Probably this patch does also fix #78269, but I'm not really sure,
since I don't seem to fully understand this bug report or the symptoms
described there :)


best regards
   Mario
-- 
There are 10 types of people in the world: Those who
understand binary, and those who don't...
--- /usr/lib/mime/packages/zgv  2006-04-26 19:47:06.000000000 +0200
+++ .mailcap    2006-07-22 19:59:38.000000000 +0200
@@ -1,6 +1,6 @@
-image/gif; /usr/bin/zgv %s; test=expr "`/usr/bin/tty`" : 
'/dev/\(tty\|vc/\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\.tty[0-9][0-9]*\.'`hostname`'$' >/dev/null 2>&1; description=GIF 
Image; nametemplate=%s.gif; needsterminal;
-image/jpeg; /usr/bin/zgv %s; test=expr "`/usr/bin/tty`" : 
'/dev/\(tty\|vc/\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\.tty[0-9][0-9]*\.'`hostname`'$' >/dev/null 2>&1; description=JPEG 
Image; nametemplate=%s.jpg; needsterminal;
-image/pjpeg; /usr/bin/zgv %s; test=expr "`/usr/bin/tty`" : 
'/dev/\(tty\|vc/\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\.tty[0-9][0-9]*\.'`hostname`'$' >/dev/null 2>&1; description=JPEG 
Image; nametemplate=%s.jpg; needsterminal;
-image/png; /usr/bin/zgv %s; test=expr "`/usr/bin/tty`" : 
'/dev/\(tty\|vc/\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\.tty[0-9][0-9]*\.'`hostname`'$' >/dev/null 2>&1; description=PNG 
Image; nametemplate=%s.png; needsterminal;
-image/tiff; /usr/bin/zgv %s; test=expr "`/usr/bin/tty`" : 
'/dev/\(tty\|vc/\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\.tty[0-9][0-9]*\.'`hostname`'$' >/dev/null 2>&1; description=TIFF 
Image; nametemplate=%s.tif; needsterminal;
-image/bmp; /usr/bin/zgv %s; test=expr "`/usr/bin/tty`" : 
'/dev/\(tty\|vc/\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\.tty[0-9][0-9]*\.'`hostname`'$' >/dev/null 2>&1; description=BMP 
Image; nametemplate=%s.bmp; needsterminal;
+image/gif; /usr/bin/zgv '%s'; test=expr "`/usr/bin/tty`" : 
'/dev/\\(tty\\|vc/\\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\\.tty[0-9][0-9]*\\.'`hostname`'$' >/dev/null 2>&1; description=GIF 
Image; nametemplate=%s.gif; needsterminal
+image/jpeg; /usr/bin/zgv '%s'; test=expr "`/usr/bin/tty`" : 
'/dev/\\(tty\\|vc/\\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\\.tty[0-9][0-9]*\\.'`hostname`'$' >/dev/null 2>&1; 
description=JPEG Image; nametemplate=%s.jpg; needsterminal
+image/pjpeg; /usr/bin/zgv '%s'; test=expr "`/usr/bin/tty`" : 
'/dev/\\(tty\\|vc/\\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\\.tty[0-9][0-9]*\\.'`hostname`'$' >/dev/null 2>&1; 
description=JPEG Image; nametemplate=%s.jpg; needsterminal
+image/png; /usr/bin/zgv '%s'; test=expr "`/usr/bin/tty`" : 
'/dev/\\(tty\\|vc/\\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\\.tty[0-9][0-9]*\\.'`hostname`'$' >/dev/null 2>&1; description=PNG 
Image; nametemplate=%s.png; needsterminal
+image/tiff; /usr/bin/zgv '%s'; test=expr "`/usr/bin/tty`" : 
'/dev/\\(tty\\|vc/\\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\\.tty[0-9][0-9]*\\.'`hostname`'$' >/dev/null 2>&1; 
description=TIFF Image; nametemplate=%s.tif; needsterminal
+image/bmp; /usr/bin/zgv '%s'; test=expr "`/usr/bin/tty`" : 
'/dev/\\(tty\\|vc/\\)[0-9][0-9]*' >/dev/null 2>&1 || expr "$STY" : 
'[0-9][0-9]*\\.tty[0-9][0-9]*\\.'`hostname`'$' >/dev/null 2>&1; description=BMP 
Image; nametemplate=%s.bmp; needsterminal

Attachment: signature.asc
Description: Digital signature

Reply via email to