Re: 2.99.3 beta and texdoc on macosx

Gerben Wierda <[email protected]> Sun, 28 Nov 2004 15:25:11 +0100
Newsgroups gmane.comp.tex.tetex.beta
Message-ID <[email protected]>
On Nov 28, 2004, at 13:26, Thomas Esser wrote:

> On Fri, Nov 26, 2004 at 11:38:12PM +0100, Sven de Vries wrote:
>> 1) it checks whether TEXDOCVIEW_dvi/ps is set the by the user and then
>> using that,
>
> That's already the case, since we are using these ${var=value} 
> constructs
> which do not change $var if the variable has been set before.
>
> BTW, the script already has a comment which explains this:
>
>     # Viewing programs, according to filename extension.  (You can
>     # override or add to them by setting environment variables).
>     # MacOS X: does not have X11 by default, so give dvi a low priority
>
>> Otherwise:
>> 	2) checking whether xdvi/gv is in the defaultpath
>> 		(and perhaps whether X11 is running)
>> 	otherwise
>> 		3) using open
>
> Something like this?
>
>         if test "x$DISPLAY" != x && type -p xdvi >/dev/null 2>&1; then
>           : ${TEXDOCVIEW_dvi='xdvi %s &'}
>         else
>           : ${TEXDOCVIEW_dvi='open %s'}
>         fi

I'd rather not see this. Even when X11 is running I do not consider the 
tools running under it the default tools. The suggestion by Sven to do 
something like (adapted)

	: ${TEXDOCVIEW_dvi='(open %s >/dev/console 2>&1 || xdvi %s) || echo 
"Method for opening %s did not work"'}

seems better to me.

>         if test "x$DISPLAY" != x && type -p gv >/dev/null 2>&1; then
>           : ${TEXDOCVIEW_ps='gv %s &'}
>         else
>           : ${TEXDOCVIEW_ps='open %s'}
>         fi
>
> Thomas
>