From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dirk-Jan C. Binnema Newsgroups: gmane.emacs.bugs Subject: bug#8454: deftheme, :inherit & overriding existing values Date: Fri, 13 May 2011 07:50:05 +0300 Organization: DJCBSoftware Message-ID: <20110513045005.D91E339C792@djcbsoftware.nl> References: <20110507091706.DC97939C792@djcbsoftware.nl> <4DC54D3D.7090409@gmail.com> <87r58980f7.fsf@stupidchicken.com> <87mxix7xvm.fsf@stupidchicken.com> <4DC8AE81.5070704@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1305262272 32234 80.91.229.12 (13 May 2011 04:51:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 May 2011 04:51:12 +0000 (UTC) Cc: 8454@debbugs.gnu.org, Chong Yidong To: Christoph Scholtes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 13 06:51:07 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QKkLD-0007y5-E4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 May 2011 06:51:07 +0200 Original-Received: from localhost ([::1]:44843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKkLC-0006GA-SQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 May 2011 00:51:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKkL9-0006Fk-MZ for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 00:51:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKkL8-0000V1-Mf for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 00:51:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKkL8-0000Uu-L6 for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 00:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QKkL7-0008Gc-Nw; Fri, 13 May 2011 00:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dirk-Jan C. Binnema Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 May 2011 04:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8454-submit@debbugs.gnu.org id=B8454.130526222131731 (code B ref 8454); Fri, 13 May 2011 04:51:01 +0000 Original-Received: (at 8454) by debbugs.gnu.org; 13 May 2011 04:50:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKkKT-0008Fk-B2 for submit@debbugs.gnu.org; Fri, 13 May 2011 00:50:21 -0400 Original-Received: from vs11.mail.saunalahti.fi ([195.197.172.106]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKkKP-0008FV-1Z for 8454@debbugs.gnu.org; Fri, 13 May 2011 00:50:18 -0400 Original-Received: from saunalahti-vams (localhost [127.0.0.1]) by vs11.mail.saunalahti.fi (Postfix) with SMTP id 85211C0041; Fri, 13 May 2011 07:50:10 +0300 (EEST) Original-Received: from vs11.mail.saunalahti.fi ([127.0.0.1]) by vs11.mail.saunalahti.fi ([195.197.172.106]) with SMTP (gateway) id A0302A82B43; Fri, 13 May 2011 07:50:10 +0300 Original-Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by vs11.mail.saunalahti.fi (Postfix) with ESMTP id 7C55AC0041; Fri, 13 May 2011 07:50:10 +0300 (EEST) Original-Received: from djcbsoftware.nl (a88-112-253-18.elisa-laajakaista.fi [88.112.253.18]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 3FCBD13951A; Fri, 13 May 2011 07:50:06 +0300 (EEST) Original-Received: from cthulhu.mindcrime.djcbsoftware.nl (cthulhu [127.0.0.1]) by djcbsoftware.nl (Postfix) with ESMTP id D91E339C792; Fri, 13 May 2011 07:50:05 +0300 (EEST) In-Reply-To: <4DC8AE81.5070704@gmail.com> Mail-Reply-To: djcb@djcbsoftware.nl User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO) X-Antivirus: VAMS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 13 May 2011 00:51:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46442 Archived-At: Hi, >>>>> On Mon, 09 May 2011 21:18:25 -0600, Christoph Scholtes ("CS") wrote: CS> On 5/8/2011 2:14 PM, Chong Yidong wrote: >> OK, I found a bug in the case where defface is called after loading a >> theme with settings for that face. The defface settings were not being >> applied; I've checked a fix into the trunk. However, I'm not sure this >> is the issue you are talking about, since this bug was not specific to >> the :inherit property. Could you check if your problem is fixed? >> >> One possible source of confusion, which may apply to Dirk-Jan's report, >> is that :inherit only tells Emacs to consult the parent face if a face >> attribute is unspecified. If the attribute is specified, it overrides >> the inheritance. So if your Custom theme want to "cancel out", say, any >> existing foreground attribute setting, you need something like >> >> '(froob ((t (:foreground unspecified :inherit parent-face)))) CS> This did not fix it for me. CS> I think Dirk-Jan and I have the same issue, though, which is the CS> behavior of :inherit. Yes -- in fact, before this change, the theme would look as expected if I loaded it before - say - Wanderlust. However, with this change, that does not work either anymore. CS> One example from my custom theme: CS> '(erc-default-face ((t (:inherit default)))) CS> This is supposed to inherit from CS> '(default ((t (:background "#3f3f3f" :foreground "#dcdccc")))) CS> but it does not work. CS> This is probably related to what you describe above, but I don't CS> really understand it. foregound in erc-default-face is unspecified, CS> right? Should the inherit get the attributes from default or not? CS> I figured out a way to make my custom theme work, though. Loading it CS> through customize does not work, but if I open the theme file and eval CS> the buffer, it works and erc shows the my custom faces. Maybe this CS> helps to troubleshoot the problem? Yes, indeed, that is what I do too now: (defun zenburn() (interactive) (load-theme 'zenburn) (load-library "~/.emacs.d/elisp/themes/zenburn-theme.el")) In general, it might make sense to first go back to 'factory settings' before changing the theme, as it's quite unlikely that theme2 always overrides everything from theme1 -- e.g. zenburn redefines hundreds of faces. Best wishes, Dirk. -- Dirk-Jan C. Binnema Helsinki, Finland e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C