Bug#247766: tetex-bin: only the last -xrm on the command line is effective
But they are using "override" to describing adding a key binding without
affecting other key bindings. When you put "quit()" on "m" which does not
have a binding, using #override means you do not delete the binding for,
say, "s", and don't have to specify it on the command line. Put this
together with the fact that I can in fact use two -xrm options, one to set
the background color and one to put "quit()" on the previously bound key
"x", and I draw the conclusion that the "override" is single object from
which the actual object inherits once all the -xrm objects are processed:
You only get one "override" is my guess. I do not know what is on your line
1107. Is it an override or a plain assignment? I don't think you should
get a warning if it is a plain assignment (i.e., no #override). Also I am
not sure that -xrm and the app-specific files XDvi and the xrdb database are
really all handled in exactly the same ways. Is #override equivalent to
xrdb's #override? Xdvi does not object if you put #anythingatall instead of
#override (but only #override seems to have a special meaning).
In any case, I leave this up to you whether you want to leave this report
open as a documentation bug for xdvi man page (at least mention that you
only get one override of a resource but can combine values as in your
example, perhaps) or reassign this to the package owning the X man page for
clarification of what #override means. Or just close it and figure you're
going to have to buy a fat OReilly book to get any good documentation on any
of this mess anyway. (I finally bought the sendmail manual, but I am not
going to live long enough to buy manuals on X windows).
-----Original Message-----
From: Stefan Ulrich [mailto:stefan-ulrich.nntp@zen.co.uk]
Sent: Thursday, May 06, 2004 7:03 PM
To: Matt Swift; 247766@bugs.debian.org
Subject: Re: 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: