[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git
From: |
Protesilaos Stavrou |
Subject: |
bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git |
Date: |
Tue, 09 Feb 2021 07:01:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On 2021-02-09, 01:33 +0200, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 08.02.2021 18:35, Protesilaos Stavrou wrote:
>> On 2021-02-08, 17:54 +0200, Dmitry Gutov <dgutov@yandex.ru> wrote:
>>> Some questions:
>>>
>>> - vc-dir-ignored face doesn't seem to be used the 'ignored' entries in
>>> the list. Wasn't that its main point?
>> Can you please specify which are those?
>> I only applied the 'vc-dir-ignored' face to the empty Git stash and
>> only
>> did so because there was a "FIXME" for it. Otherwise, yes, the new face
>> should be used wherever it makes sense.
>
> The 'ignored' files in the vc-dir tree.
>
> To see one, edit some file that has a matching entry in .gitignore (such
> as ChangeLog in a Emacs repo checkout). You should see it in VC-Dir
> buffer now, with status 'ignored'.
Please see the attached patch (unless you want me to open a new bug
report). This should now account for the ignored state. It also edits
a face that I had missed earlier, as was discussed herein.
>> As for its default value, I was not sure what those other states were,
>> so I just used 'vc-dir-header-value', thinking that this is a neutral
>> value.
>
> All possible states are listed in the docstring for 'vc-state'.
>
> About half of them (almost) are pretty rare, though.
>
>> Should the default look like "edited" as well? Or does it have some
>> other meaning? If the latter, then maybe we must have extra face?
>
> I don't have a strong opinion on this right now. But we should be
> consistent between the 'default' version and the backend-specific
> versions of the method.
>
> Having a face per status might be too much both for the user and the
> theme authors, though (who will have to pick appropriate colors).
>
> So I would keep the number of faces at 4: up-to-date, warning, ignored
> and edited.
I also think that 4 faces should suffice. Having checked the doc string
of 'vc-state' this is how I feel they should be organised.
| status | face ("?" means suggestion) |
|------------------+-----------------------------|
| up-to-date | vc-dir-status-up-to-date |
| edited | vc-dir-status-edited |
| USER | vc-dir-status-warning? |
| needs-update | vc-dir-status-warning? |
| unlocked-changes | vc-dir-status-warning? |
| added | vc-dir-status-edited |
| removed | vc-dir-status-edited |
| conflict | vc-dir-status-warning |
| missing | vc-dir-status-warning |
| ignored | vc-dir-ignored |
| unregistered | vc-dir-status-edited |
With regard to 'vc-dir-ignored', do you think we should rename it to
'vc-dir-status-ignored' for the sake of consistency? I wrote it that
way to denote that it is more generic than those that apply to files,
but I am okay either way.
--
Protesilaos Stavrou
protesilaos.com
0001-Refine-use-of-new-vc-dir-faces.patch
Description: Text Data
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, (continued)
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Protesilaos Stavrou, 2021/02/09
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Juri Linkov, 2021/02/09
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Protesilaos Stavrou, 2021/02/09
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Protesilaos Stavrou, 2021/02/09
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Dmitry Gutov, 2021/02/09
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Protesilaos Stavrou, 2021/02/09
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Dmitry Gutov, 2021/02/10
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Dmitry Gutov, 2021/02/08
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Protesilaos Stavrou, 2021/02/08
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Dmitry Gutov, 2021/02/08
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git,
Protesilaos Stavrou <=
- bug#46358: 28.0.50; [PATCH] Add vc-dir faces; also apply them to vc-git, Dmitry Gutov, 2021/02/09