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

Bug#247766: tetex-bin: only the last -xrm on the command line is effective



Matt Swift <swift@alum.mit.edu> writes:

[ newlines added ]

>     /usr/bin/xdvi.real \
>     -xrm 'XDvi.mainTranslations: #override "x":quit()' \
>     -xrm 'XDvi.mainTranslations: #override "]":quit()' \
>     -xrm 'XDvi.mainTranslations: #override "m":quit()' test.dvi

> That should make the 'x' and ']' and 'm' keys quit.  In fact, only the
> 'm' key and the default 'q' key quit.  If you switch them around, it
> is always the last one specified that works.  I say they are entirely
> ignored because the normal binding of the 'x' key is what the 'x' key
> does, if it is in any position other than the last.

> I have no idea whether this is a problem with xdvi, with X, or with X
> documentation.

It's not a bug in xdvi; to me it looks like a `misfeature' or a
documentation bug of the xrm command-line options ... if you try
the same in ~/.Xdefaults:

XDvi.mainTranslations: #override "x":quit()
XDvi.mainTranslations: #override "]":quit()
XDvi.mainTranslations: #override "m":quit()

then `xrdb ~/.Xdefaults' gives the warnings:

xrdb:  "XDvi.mainTranslations" on line 1117 overrides entry on line 1107
xrdb:  "XDvi.mainTranslations" on line 1118 overrides entry on line 1117
xrdb:  "XDvi.mainTranslations" on line 1119 overrides entry on line 1118

Obviously, multiple specifications for the same resource name
will cause a clash. Chapter 10 in O'Reilly's X Toolkit Intrinsics
Programming Manual seems to indicate that the xrm options are
evaluated before the resource database is actually built from
the application default files and command-line options; maybe
that's the reason why there is no warning about the clash ...

FWIW, the following should work:

xdvi -xrm 'XDvi.mainTranslations: #override "x":quit()\n"]":quit()\n"m":quit()'

-- 
Stefan Ulrich



Reply to: