From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55623: 29.0.50; Mention that (face-foreground 'default) can return "unspecified-fg" Date: Wed, 25 May 2022 16:18:51 +0300 Message-ID: <83pmk14uo4.fsf@gnu.org> References: <87ilpub287.fsf@gmail.com> <87o7zmjd2f.fsf@yahoo.com> <87czg2aw0q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31633"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 55623@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 25 15:20:54 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ntqwV-00082N-9z for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 May 2022 15:20:51 +0200 Original-Received: from localhost ([::1]:35974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntqwT-0007hS-NB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 May 2022 09:20:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntqvi-0007fK-UY for bug-gnu-emacs@gnu.org; Wed, 25 May 2022 09:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntqvi-0007ly-KZ for bug-gnu-emacs@gnu.org; Wed, 25 May 2022 09:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntqvi-0004V3-A9 for bug-gnu-emacs@gnu.org; Wed, 25 May 2022 09:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 May 2022 13:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55623 X-GNU-PR-Package: emacs Original-Received: via spool by 55623-submit@debbugs.gnu.org id=B55623.165348476217238 (code B ref 55623); Wed, 25 May 2022 13:20:02 +0000 Original-Received: (at 55623) by debbugs.gnu.org; 25 May 2022 13:19:22 +0000 Original-Received: from localhost ([127.0.0.1]:54624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntqv4-0004Ty-65 for submit@debbugs.gnu.org; Wed, 25 May 2022 09:19:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntqv0-0004Tk-H4 for 55623@debbugs.gnu.org; Wed, 25 May 2022 09:19:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntquv-0007hF-3p; Wed, 25 May 2022 09:19:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=W3PkX5BBt1cEKPqz4HL+z2NyRMTKQec8zWaXhTHrEZo=; b=hSQxh6eX3T5FKzqjkDPe CvouNav+v3zXkfK+9Mjfxv/TPyaEGu2ev87sdxC0OVICGXjXgFWIB0yVP+GweIp82Na5KZkJ9jbF6 PlUwWSkkvKYhdBiWaHTsAzwtOEqdq2JZMqyQFzgWzbD6P8rEb5iXE70VQk342vZ8gbCXHF2KZprz+ OrSPj5Cs/3vRAMehGHNuv4U+payyE0URAaSv3fD05AJM9deeHK5txE39KWt7t7peYa0Yt9RGJPsqY vMAXBEz9IrRvooqBiVNJjhxz6jo2yB6KLU9kkBPWDbVRv54rdBl2451ESrR0lUdfdoVRFJOhYsfpf fB/xomAPBwnxiQ==; Original-Received: from [87.69.77.57] (port=1346 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntquh-0007JA-TK; Wed, 25 May 2022 09:19:02 -0400 In-Reply-To: <87czg2aw0q.fsf@gmail.com> (message from Visuwesh on Wed, 25 May 2022 13:23:09 +0530) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233058 Archived-At: > Resent-From: Visuwesh > Original-Sender: "Debbugs-submit" > Resent-CC: bug-gnu-emacs@gnu.org > Resent-Sender: help-debbugs@gnu.org > Cc: luangruo@yahoo.com > From: Visuwesh > Date: Wed, 25 May 2022 13:23:09 +0530 > > [புதன் மே 25, 2022] Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: > > > Visuwesh writes: > > > >> In a tty frame and when using a theme that does not explicitly set the > >> default face's :foreground/:background [1], (face-attribute 'default :foreground) > >> returns "unspecified-fg". This value is surprising when the docstring > >> of `face-attribute' says, > >> > >> To ensure that the return value is always specified and absolute, use a > >> value of ‘default’ for INHERIT; this will resolve any unspecified or > >> relative values by merging with the ‘default’ face (which is always > >> completely specified). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >> ^^^^^^^^^^^^^^^^^^^^^ > >> > >> I opened the Elisp manual and tried to isearch for "unspecified-fg", but > >> it got me no matches. It would be nice if this return value was > >> documented somewhere. > > > > Isn't that a special color which means to use the terminal's default > > foreground (and/or background, in the case of unspecified-bg) colors? > > > > If so, it should be documented as that instead. > > Indeed, "unspecified-fg/bg" means to use the terminal's default fg/bg. Right. Thus, when the documentation talks about "unspecified values for attributes" and about the default face being "always completely specified", it excluded the "unspecified-fg" and "unspecified-bg" values, because those are considered "specified", except in some rare cases. It is not an accident that they are strings and not symbols. > But AFAICT, it is not specified in the manual anywhere. They aren't documented on purpose: documenting them would be messy and at best will confuse anyone who isn't familiar with the internals of color support on TTY frames. They are in effect internal implementation details which unfortunately leak outside of the internals. What would you like to be documented about these special values, and why?