From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yavuz Newsgroups: gmane.emacs.devel Subject: Re: customize-themes doesn't allow backquote or :inherit Date: Mon, 18 Oct 2010 17:54:55 +0000 (UTC) Message-ID: References: <87y69wsehy.fsf@stupidchicken.com> <871v7neabq.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1287424524 26925 80.91.229.12 (18 Oct 2010 17:55:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2010 17:55:24 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 18 19:55:23 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P7tva-0003Og-Ie for ged-emacs-devel@m.gmane.org; Mon, 18 Oct 2010 19:55:18 +0200 Original-Received: from localhost ([127.0.0.1]:33754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7tvZ-0007VC-Oq for ged-emacs-devel@m.gmane.org; Mon, 18 Oct 2010 13:55:17 -0400 Original-Received: from [140.186.70.92] (port=38557 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7tvO-0007RY-VT for emacs-devel@gnu.org; Mon, 18 Oct 2010 13:55:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7tvO-0002Y2-1L for emacs-devel@gnu.org; Mon, 18 Oct 2010 13:55:06 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:48757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7tvN-0002XO-Rc for emacs-devel@gnu.org; Mon, 18 Oct 2010 13:55:05 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P7tvL-0003J3-BM for emacs-devel@gnu.org; Mon, 18 Oct 2010 19:55:03 +0200 Original-Received: from 78.172.214.96 ([78.172.214.96]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Oct 2010 19:55:03 +0200 Original-Received: from justloop by 78.172.214.96 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Oct 2010 19:55:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 78.172.214.96 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b6) Gecko/20100101 Firefox/4.0b6) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131814 Archived-At: Thinking a bit laterally, there are 2 alternate mechanisms that could help (at the loss of some flexibility): 1. There are named colors, such as "royal blue" that one can use instead of "#RRGGBB" format. If it were possible to user-define more, that would be a solution. 2. There is the :inherit keyword that I couldn't get to work the way I thought it would--allow the designer to define any face attribute (and not just a color) once using a virtual face, and then reuse it multiple times: (custom-theme-set-faces 'mytheme '(highlighted-fg ((t (:foreground "#123456" :weight bold)))) ... '(font-lock-error ((t (:inherit highlighted-fg) ...) There is also a separate problem with saving a user-defined theme for future sessions in any other directory than .emacs.d. I save them in .emacs.d./themes, and set custom-theme-directory to it in my customization file. Then I can interactively select it using M-x customize-themes, and save it for future sessions (the name gets saved into the .emacs.d/custom.el), but when emacs is restarted, it cannot find the theme, presumably because custom.el is loaded before the my customization file. Standard themes work fine.