From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Setting rectangle-preview face in init. Date: Fri, 11 Oct 2019 12:41:33 -0400 Message-ID: References: <20191011124530.kzj7ucywfeysxbty@Ergus> <20191011141022.jqcc4d6ic4qvstvl@Ergus> <20191011154429.dcoogy5kqzdhdhh7@Ergus> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="85854"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: "\"T.V Raman\" via \"Emacs development discussions.\"" To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 11 20:06:41 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIzJG-000M96-Ko for ged-emacs-devel@m.gmane.org; Fri, 11 Oct 2019 20:06:38 +0200 Original-Received: from localhost ([::1]:55130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIzJF-0000PN-6P for ged-emacs-devel@m.gmane.org; Fri, 11 Oct 2019 14:06:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43365) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIxz3-0006LQ-Dc for emacs-devel@gnu.org; Fri, 11 Oct 2019 12:41:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIxz1-00022m-VV for emacs-devel@gnu.org; Fri, 11 Oct 2019 12:41:40 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44445) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iIxz1-00020k-7V for emacs-devel@gnu.org; Fri, 11 Oct 2019 12:41:39 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 775F9852BF; Fri, 11 Oct 2019 12:41:36 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CE74D81243; Fri, 11 Oct 2019 12:41:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1570812094; bh=fQ81vSJA847tp6SS3/S78LmmiaM4uanAGv6zXW/uTCM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=iKp+lwvj/PdbwUh87xDn4De4W/H/oBlpfMDgdGan1sEa+BluDHFC04GQ9mL9YfRq7 iTN6nzhwvTNuOXnE45yU7em2z3d+cLzKfUsVtC4kzVHDq4Drul+Mj8MOLCsKVf4scA eiQeFl7GHY35uvASbTn+KHRoV6PRtX1l5FFMi8G3t8dxnFWlHi00mhu9F8QtxK8qeu gInynnOfrqMj7aFUWoUnieIzPR5Qv6TaUF1lfBiFBVsC2kOXBZe6kVqjrTHCbJEIQv 0KT1SZaOEq4X7Qu4Jko4Wxmb1L0rSyrItacSihRnUkMEUMZee1m9HKfF1vOMvxBSnQ l5J2bVrdMdQ0w== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A179E12041A; Fri, 11 Oct 2019 12:41:34 -0400 (EDT) In-Reply-To: <20191011154429.dcoogy5kqzdhdhh7@Ergus> (Ergus's message of "Fri, 11 Oct 2019 17:44:29 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240894 Archived-At: > I don't like to use Customize interfaces because: I don't either, but for faces I've found its advantages are significant compared to the various problems with set-face-attribute. > 3) Some complex setups breaks it (like defining conditional faces > depending of some if conditions (window-system, (display-graphic-p)).) Given that Emacs can have GUI and tty frames within the same session, if you want your config to work reliably, the window-system/display-graphic-p/... tests need to be re-executed for every frame created (rather than calling set-face-attribute such that it applies to all frames). Custom actually does let you deal with that by specifying different attribute values depending on window-system/display-graphic-p/... (the UI isn't great for that, so I typically edit the custom-set-faces by hand to do that, which is of course not recommended either, ...). > I won't ask for a change for anything of this, FWIW, I think it'd be good to have Elisp-access to Custom's face manipulation so you wouldn't have to choose between the two, Stefan