unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: luangruo@yahoo.com, adam@alphapapa.net, 55623@debbugs.gnu.org
Subject: bug#55623: 29.0.50; Mention that (face-foreground 'default) can return "unspecified-fg"
Date: Wed, 25 May 2022 22:52:00 +0530	[thread overview]
Message-ID: <87o7zla5on.fsf@gmail.com> (raw)
In-Reply-To: <83tu9dpmlv.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 May 2022 20:07:24 +0300")

[புதன் மே 25, 2022] Eli Zaretskii wrote:

>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: luangruo@yahoo.com,  55623@debbugs.gnu.org, adam@alphapapa.net
>> Date: Wed, 25 May 2022 20:27:41 +0530
>> 
>> > 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.
>> >
>> 
>> I agree but I think anyone who is fairly familiar with terminal
>> emulators can understand that you cannot find the terminal emulator's
>> colourscheme (for a lack of a better word) in a terminal-agnostic way.
>> Thus, I believe there won't be too much confusion if we added such a
>> text.
>
> Which "such text" did you have in mind?  The problem here is to come
> up with a useful text, which explains something without raising a lot
> more questions.
>

The text that could be added to describe these strange colour names.

>> > What would you like to be documented about these special values, and
>> > why?
>> 
>> I would like it if some words along the lines of...
>> 
>>     The 'default' face is always fully specified except in special cases
>>     of TTY frames where :foreground and :background attributes may be
>>     the strings "unspecified-fg" and "unspecified-bg" respectively.
>
> Without explaining the reason for these strange "color names", how can
> this be useful to anyone?
>

Which is why, I said "You could also add the implementation details, but
I leave the decision to you."  How about the following instead then?

    The 'default' face is always fully specified except in special cases
    of TTY frames where :foreground and :background attributes may be
    the strings "unspecified-bg" and "unspecified-bg" respectively to
    mean to use the TTY's color for the foreground and background.

>> As for the why: In the bug report I alluded to in the OP, ement.el
>> relied on the completeness of the default-face specification to get the
>> colour of the face which is then used to calculate a different colour
>> (similar to the rainbow coloured nicknames you often see in irc
>> clients).  This special case of the TTY frame would be handled correctly
>> if it was spelt out somewhere.  (It isn't now since the value returned is
>> a surprise.)
>
> In such rare cases, it is much easier to explain the issue to a person
> who needs to deal with it (or thinks he/she needs to) than come up
> with a description useful enough to be in the manual.
>
> They are just "special color names", that's all.

I suppose.  But I think it would be for the best if we outlined it in
the manual.  It comes as a "surprise" after all.





  reply	other threads:[~2022-05-25 17:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25  5:39 bug#55623: 29.0.50; Mention that (face-foreground 'default) can return "unspecified-fg" Visuwesh
2022-05-25  7:17 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-25  7:53   ` Visuwesh
2022-05-25 13:18     ` Eli Zaretskii
2022-05-25 14:57       ` Visuwesh
2022-05-25 17:07         ` Eli Zaretskii
2022-05-25 17:22           ` Visuwesh [this message]
2022-05-25 17:37             ` Eli Zaretskii
2022-05-27  5:44               ` Adam Porter
2022-05-27  6:34                 ` Eli Zaretskii
2022-05-27  7:27                   ` Adam Porter
2022-06-28 21:37                   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7zla5on.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=55623@debbugs.gnu.org \
    --cc=adam@alphapapa.net \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).