From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Hill Newsgroups: gmane.emacs.help Subject: Changing X Resources Date: Tue, 7 Sep 2004 11:50:58 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1637015499==" X-Trace: sea.gmane.org 1094583100 4937 80.91.224.253 (7 Sep 2004 18:51:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Sep 2004 18:51:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 07 20:51:24 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C4l3s-0001Nc-00 for ; Tue, 07 Sep 2004 20:51:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4l96-00047v-Eg for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Sep 2004 14:56:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C4l8w-00047q-S0 for help-gnu-emacs@gnu.org; Tue, 07 Sep 2004 14:56:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C4l8u-00047d-55 for help-gnu-emacs@gnu.org; Tue, 07 Sep 2004 14:56:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4l8u-00047a-23 for help-gnu-emacs@gnu.org; Tue, 07 Sep 2004 14:56:36 -0400 Original-Received: from [207.158.54.5] (helo=renfield.synergymicro.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1C4l3Y-00077Q-9P for help-gnu-emacs@gnu.org; Tue, 07 Sep 2004 14:51:04 -0400 Original-Received: from synergy.san.synergymicro.com (synergy.san.synergymicro.com [10.1.2.12]) by renfield.synergymicro.com (8.12.10/8.12.10) with ESMTP id i87IqN9f023649 for ; Tue, 7 Sep 2004 11:52:23 -0700 Original-Received: from [10.1.5.75] ([10.1.5.75]) by synergy.san.synergymicro.com (8.12.10/8.12.10) with ESMTP id i87IpIkK019488 for ; Tue, 7 Sep 2004 11:51:19 -0700 Original-To: help-gnu-emacs@gnu.org X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.70j X-CanItPRO-Stream: default X-Canit-Stats-ID: 255537 - a37e770f5c4d X-Scanned-By: CanIt (www . canit . ca) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20489 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20489 --===============1637015499== Content-Type: multipart/alternative; boundary="============_-1117539436==_ma============" --============_-1117539436==_ma============ Content-Type: text/plain; charset="us-ascii" ; format="flowed" 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" Emacs.menu*font: 6x12 Emacs.dialog*font: 9x15bold Then I can start a second Emacs session with reversed setting, after which "appres" gives me: > appres "Emacs" Emacs.menu*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, 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. --Greg --============_-1117539436==_ma============ Content-Type: text/html; charset="us-ascii" Changing X Resources
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"
Emacs.menu*font:        6x12
Emacs.dialog*font:  9x15bold

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

> appres "Emacs"
Emacs.menu*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.
</flame>

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

--Greg
--============_-1117539436==_ma============-- --===============1637015499== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1637015499==--