[Top][All Lists]

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

Changing X Resources

From: Greg Hill
Subject: Changing X Resources
Date: Tue, 7 Sep 2004 11:50:58 -0700

I know how to set things like the font used for the menu bar and popup menus when starting Emacs, by either specifying them in my .Xdefaults file or as command line arguments.

However, I can not find any way to change those resources _after_ Emacs has already started.  I have found a function called "x-get-resource" that tells me what the current value is, but nothing like "x-set-resource" or "x-put-resource" for changing it.

Does anyone know of any method for doing that?  I'm currently using GNU Emacs 21.2.2 (sparc-sun-solaris2.7, X toolkit).

Incidentally, I have found that after starting an Emacs session with one set of resource settings I can run "appres" from my xterm shell and get:

> appres "Emacs"*font:        6x12
Emacs.dialog*font:  9x15bold

Then I can start a second Emacs session with reversed setting, after which "appres" gives me:

> appres "Emacs"*font:    9x15bold
Emacs.dialog*font:      6x12

But my first Emacs session continues to use the setting it was started with, while the second session uses the new settings.  This suggests to me that Emacs is keeping a copy of the settings it read at startup somewhere internal to itself, and specifying them anew every time it pops up a new frame (X "window").  If only I could find out where that "somewhere" is and modify it.

I would be happy to add a function to the C code and re-make my Emacs if that is what it takes.  However,

<flame source="extreme frustration">
after spending a couple of hours searching for hints in the C source code, I was last seen running naked down the street, screaming and tearing my hair out.  If Emacs were not freeware, I would have to assume that its author was primarily motivated by maintaining job security.  Never in my 25-year career as a computer programmer have I encountered such obscure code, obviously written without a moment's thought given to making it maintainable or even scrutable by anyone but the original author and perhaps one or two privileged "cognoscenti" who have been entrusted with a magic decoder ring.

Any help anyone can give me (perhaps a couple of Valium) will be greatly appreciated.  Thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]