~protesilaos/modus-themes

3 2

Support for highlight-changes-colors

Details
Message ID
<878rs14il4.fsf@posteo.net>
DKIM signature
missing
Download raw message
Hi,

I was wondering if you would be interested in supporting
highlight-changes-colors.  It would probably have to be done similarly
to vc-annotate.

To see how it currently looks like, enable `highlight-changes-mode' in a
buffer of choice, make some modifications which should be highlighted in
a modus-like way, but after "rotating" the colors using
`highlight-changes-rotate-faces' the colors are all off.  More so if
switching between modus operandi and vivendi, as the value of
`highlight-changes-colors' is determined by the value of
(frame-parameter nil 'background-mode) at the point in time when
hilit-chg.el is loaded.  But I am not sure if Modus can address that
issue.

-- 
	Philip Kaludercic
Details
Message ID
<87r15tpjsh.fsf@protesilaos.com>
In-Reply-To
<878rs14il4.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
Patch: +6 -0
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Tue, 19 Apr 2022 07:51:03 +0000
>
> Hi,

Hello Philip!

> I was wondering if you would be interested in supporting
> highlight-changes-colors.  It would probably have to be done similarly
> to vc-annotate.
>
> To see how it currently looks like, enable `highlight-changes-mode' in a
> buffer of choice, make some modifications which should be highlighted in
> a modus-like way, but after "rotating" the colors using
> `highlight-changes-rotate-faces' the colors are all off.  More so if
> switching between modus operandi and vivendi, as the value of
> `highlight-changes-colors' is determined by the value of
> (frame-parameter nil 'background-mode) at the point in time when
> hilit-chg.el is loaded.  But I am not sure if Modus can address that
> issue.

If we modify the `highlight-changes-colors', the values are applied
correctly but are not updated when switching between the themes:


diff --git a/modus-themes.el b/modus-themes.el
index 77d9595..6b4f297 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -7704,6 +7704,9 @@ ;;;; flymake fringe indicators
    `(flymake-error-bitmap '(flymake-double-exclamation-mark modus-themes-fringe-red))
    `(flymake-warning-bitmap '(exclamation-mark modus-themes-fringe-yellow))
    `(flymake-note-bitmap '(exclamation-mark modus-themes-fringe-cyan))
;;;; highlight-changes
    `(highlight-changes-colors '(,magenta-intense ,blue-intense ,green-intense ,yellow-intense ,red-intense ,cyan-intense))
    `(highlight-changes-face-list nil)
;;;; ibuffer
    `(ibuffer-deletion-face 'modus-themes-mark-del)
    `(ibuffer-filter-group-name-face 'modus-themes-pseudo-header)


If, however, we change the 'highlight-changes-face-list', then the
theme switch works as expected:


diff --git a/modus-themes.el b/modus-themes.el
index 77d9595..5dd8097 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -7704,6 +7704,9 @@ ;;;; flymake fringe indicators
    `(flymake-error-bitmap '(flymake-double-exclamation-mark modus-themes-fringe-red))
    `(flymake-warning-bitmap '(exclamation-mark modus-themes-fringe-yellow))
    `(flymake-note-bitmap '(exclamation-mark modus-themes-fringe-cyan))
;;;; highlight-changes
    `(highlight-changes-colors nil)
    `(highlight-changes-face-list '(error success warning bold bold-italic))
;;;; ibuffer
    `(ibuffer-deletion-face 'modus-themes-mark-del)
    `(ibuffer-filter-group-name-face 'modus-themes-pseudo-header)


What do you think?

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<87zgkho4rr.fsf@posteo.net>
In-Reply-To
<87r15tpjsh.fsf@protesilaos.com> (view parent)
DKIM signature
missing
Download raw message
Protesilaos Stavrou <info@protesilaos.com> writes:

> diff --git a/modus-themes.el b/modus-themes.el
> index 77d9595..5dd8097 100644
> --- a/modus-themes.el
> +++ b/modus-themes.el
> @@ -7704,6 +7704,9 @@ ;;;; flymake fringe indicators
>      `(flymake-error-bitmap '(flymake-double-exclamation-mark modus-themes-fringe-red))
>      `(flymake-warning-bitmap '(exclamation-mark modus-themes-fringe-yellow))
>      `(flymake-note-bitmap '(exclamation-mark modus-themes-fringe-cyan))
> +;;;; highlight-changes
> +    `(highlight-changes-colors nil)
> +    `(highlight-changes-face-list '(error success warning bold bold-italic))
>  ;;;; ibuffer
>      `(ibuffer-deletion-face 'modus-themes-mark-del)
>      `(ibuffer-filter-group-name-face 'modus-themes-pseudo-header)
>
>
> What do you think?

This appears to work great, my only issue is that with `error' at the
beginning of the list, the difference between the initial
`highlight-changes' face and error is too slight.  Perhaps swapping
error and success might help?

-- 
	Philip Kaludercic
Details
Message ID
<87o80xpi54.fsf@protesilaos.com>
In-Reply-To
<87zgkho4rr.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Tue, 19 Apr 2022 08:29:12 +0000
>
> Protesilaos Stavrou <info@protesilaos.com> writes:
>
>> diff --git a/modus-themes.el b/modus-themes.el
>> index 77d9595..5dd8097 100644
>> --- a/modus-themes.el
>> +++ b/modus-themes.el
>> @@ -7704,6 +7704,9 @@ ;;;; flymake fringe indicators
>>      `(flymake-error-bitmap '(flymake-double-exclamation-mark modus-themes-fringe-red))
>>      `(flymake-warning-bitmap '(exclamation-mark modus-themes-fringe-yellow))
>>      `(flymake-note-bitmap '(exclamation-mark modus-themes-fringe-cyan))
>> +;;;; highlight-changes
>> +    `(highlight-changes-colors nil)
>> +    `(highlight-changes-face-list '(error success warning bold bold-italic))
>>  ;;;; ibuffer
>>      `(ibuffer-deletion-face 'modus-themes-mark-del)
>>      `(ibuffer-filter-group-name-face 'modus-themes-pseudo-header)
>>
>>
>> What do you think?
>
> This appears to work great, my only issue is that with `error' at the
> beginning of the list, the difference between the initial
> `highlight-changes' face and error is too slight.  Perhaps swapping
> error and success might help?

Very well!  I moved the `error' to the middle of the list so that it
does not show up so quickly (per commit 0751e31).

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)