unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Protesilaos Stavrou <info@protesilaos.com>
To: Juri Linkov <juri@linkov.net>
Cc: 46358@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>,
	Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git
Date: Tue, 09 Feb 2021 18:30:46 +0200	[thread overview]
Message-ID: <875z31td8p.fsf@protesilaos.com> (raw)
In-Reply-To: <8735y538wi.fsf@mail.linkov.net> (Juri Linkov's message of "Tue,  09 Feb 2021 11:19:01 +0200")

On 2021-02-09, 11:19 +0200, Juri Linkov <juri@linkov.net> wrote:

>>>> Maybe better to display the empty Git stash header using the default
>>>> colors, and then highlight it differently only when it's non-empty?
>>>
>>> Not with vc-dir-ignored, though (it is based on the 'shadow' face).
>>
>> Before this change, the empty stash looked the same as all other
>> headers' values.
>
> It could continue looking the same as all other headers' values.

Thinking again about this, I now agree with this view.  An empty stash
is not an "inactive" status but rather a valid header value.

>> This meant that there was no distinction between empty and non-empty
>> stashes, something that was noted as a "FIXME" in the source code.
>
> Indeed, it could be better to have a distinction between empty and
> non-empty stashes.  The FIXME proposed to use a different face
> when nothing is stashed.
>
> But it seems better to use a different face when something is stashed.
> It's important to attract user attention to the fact that there are
> stashes laying around.

I actually feel that this level of distinction already exists.  When the
stash is non-empty, there is a button/link which by default is blue, so
it contrasts well with the orange header values.  This button can be
used to toggle the visibility of the stash list.  Stash entries are the
same color as all other header values, yet their presence is already
quite obvious in context.

>> I think there is value in distinguishing between those two states,
>> though I am fine with some other choice of fallback color/face.
>> Currently the empty stash uses 'vc-dir-ignored' which inherits from
>> 'shadow'.  Whereas others use 'vc-dir-header-value' which inherit from
>> 'font-lock-variable-name-face'.
>
> Could some of new vc-dir faces that you added recently
> be used for non-empty stashes?

In principle yes, though I now believe that we do not need to introduce
such a qualification.

>> If you feel this is a problem 'vc-dir-ignored' could also inherit from
>> 'font-lock-variable-name-face'.
>
> It's good that 'vc-dir-ignored' inherits from the 'shadow' face
> when it's used on files with the "ignored" status.  Then it
> could be renamed to 'vc-dir-status-ignored' as you already proposed.

Yes, it should be renamed.

I will now use this information, as well as what Dmitry shared in the
other comment to prepare a new patch that covers everything.  You can
all test it before it gets applied.  I will share it in this thread
either later in the day or tomorrow.

Thank you!

-- 
Protesilaos Stavrou
protesilaos.com





  reply	other threads:[~2021-02-09 16:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 11:42 bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git Protesilaos Stavrou
2021-02-07 15:15 ` Eli Zaretskii
2021-02-07 16:15   ` Protesilaos Stavrou
2021-02-08  6:55     ` Lars Ingebrigtsen
2021-02-08 18:17       ` Juri Linkov
2021-02-08 23:24         ` Dmitry Gutov
2021-02-09  6:42           ` Protesilaos Stavrou
2021-02-09  9:19             ` Juri Linkov
2021-02-09 16:30               ` Protesilaos Stavrou [this message]
2021-02-09 17:46                 ` Protesilaos Stavrou
2021-02-10  1:48                   ` Dmitry Gutov
2021-02-10  4:06                     ` Protesilaos Stavrou
2021-02-10 13:32                       ` Dmitry Gutov
2021-02-08 15:54     ` Dmitry Gutov
2021-02-08 16:35       ` Protesilaos Stavrou
2021-02-08 23:33         ` Dmitry Gutov
2021-02-09  5:01           ` Protesilaos Stavrou
2021-02-09 13:05             ` Dmitry Gutov

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=875z31td8p.fsf@protesilaos.com \
    --to=info@protesilaos.com \
    --cc=46358@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    /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).