~protesilaos/modus-themes

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
13 3

[PATCH] Add theme property tags for modus-{operandi,vivendi}-theme

Details
Message ID
<877d116lh4.fsf@posteo.net>
DKIM signature
missing
Download raw message
Patch: +6 -0
* modus-operandi-theme.el: Add autoloaded theme properties.
* modus-vivendi-theme.el: Add autoloaded theme properties.

As introduced in https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-10/msg00886.html.
---
 modus-operandi-theme.el | 3 +++
 modus-vivendi-theme.el  | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 6e609c0..c981e8b 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -71,4 +71,7 @@ which corresponds to a minimum contrast in relative luminance of

  (provide-theme 'modus-operandi))

;;;###theme-autoload
(put 'modus-operandi 'theme-properties '(:background-mode light :kind color-scheme :family modus))

;;; modus-operandi-theme.el ends here
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 579b2af..746a008 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -71,4 +71,7 @@ which corresponds to a minimum contrast in relative luminance of

  (provide-theme 'modus-vivendi))

;;;###theme-autoload
(put 'modus-vivendi 'theme-properties '(:background-mode dark :kind color-scheme :family modus))

;;; modus-vivendi-theme.el ends here
-- 
2.37.3
Details
Message ID
<87fsfo25uh.fsf@protesilaos.com>
In-Reply-To
<877d116lh4.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Sat, 15 Oct 2022 17:32:55 +0000
>
> * modus-operandi-theme.el: Add autoloaded theme properties.
> * modus-vivendi-theme.el: Add autoloaded theme properties.
>
> As introduced in https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-10/msg00886.html.
> ---
>  modus-operandi-theme.el | 3 +++
>  modus-vivendi-theme.el  | 3 +++
>  2 files changed, 6 insertions(+)

Installed the patch.  Thank you for this and for the work in emacs.git!

-- 
Protesilaos Stavrou
https://protesilaos.com
Rudolf Adamkovič <salutis@me.com>
Details
Message ID
<m2lepgrd8l.fsf@me.com>
In-Reply-To
<877d116lh4.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
Philip Kaludercic <philipk@posteo.net> writes:

> As introduced in [...]

BTW, we could also perhaps deprecate 'modus-themes-toggle' in favor of
'toggle-theme' on Emacs 29.

-- 
"Strange as it may sound, the power of mathematics rests on its evasion
of all unnecessary thought and on its wonderful saving of mental
operations."
-- Ernst Mach, 1838-1916

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
Details
Message ID
<87y1tgfppq.fsf@protesilaos.com>
In-Reply-To
<m2lepgrd8l.fsf@me.com> (view parent)
DKIM signature
missing
Download raw message
> From: Rudolf Adamkovič <salutis@me.com>
> Date: Sat, 15 Oct 2022 23:25:14 +0200
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> As introduced in [...]
>
> BTW, we could also perhaps deprecate 'modus-themes-toggle' in favor of
> 'toggle-theme' on Emacs 29.

In principle, I am fine with this.  Though note that the themes support
Emacs 27.1 and there will be no pressure to change that even after Emacs
29 becomes the new stable.

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

>> From: Philip Kaludercic <philipk@posteo.net>
>> Date: Sat, 15 Oct 2022 17:32:55 +0000
>>
>> * modus-operandi-theme.el: Add autoloaded theme properties.
>> * modus-vivendi-theme.el: Add autoloaded theme properties.
>>
>> As introduced in https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-10/msg00886.html.
>> ---
>>  modus-operandi-theme.el | 3 +++
>>  modus-vivendi-theme.el  | 3 +++
>>  2 files changed, 6 insertions(+)
>
> Installed the patch.  Thank you for this and for the work in emacs.git!

Great.

Just one meta-question, I hope there was nothing wrong with the patch,
because this was my first "real-world" experiment at using the new
`vc-prepare-patch' command that was recently added.
Details
Message ID
<87wn906ue3.fsf@protesilaos.com>
In-Reply-To
<8735bo6upk.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Sun, 16 Oct 2022 08:25:43 +0000
>
> Protesilaos Stavrou <info@protesilaos.com> writes:
>
>>> From: Philip Kaludercic <philipk@posteo.net>
>>> Date: Sat, 15 Oct 2022 17:32:55 +0000
>>>
>>> * modus-operandi-theme.el: Add autoloaded theme properties.
>>> * modus-vivendi-theme.el: Add autoloaded theme properties.
>>>
>>> As introduced in https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-10/msg00886.html.
>>> ---
>>>  modus-operandi-theme.el | 3 +++
>>>  modus-vivendi-theme.el  | 3 +++
>>>  2 files changed, 6 insertions(+)
>>
>> Installed the patch.  Thank you for this and for the work in emacs.git!
>
> Great.
>
> Just one meta-question, I hope there was nothing wrong with the patch,
> because this was my first "real-world" experiment at using the new
> `vc-prepare-patch' command that was recently added.

It worked just fine.  I could not tell the difference.

Since we are on the meta level: I use notmuch as my MUA.  While viewing
a message, I invoke a command which appends its filesystem path to the
kill-ring.  Then I switch to the relevant project and do 'git am PATH'.

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

>> From: Philip Kaludercic <philipk@posteo.net>
>> Date: Sun, 16 Oct 2022 08:25:43 +0000
>>
>> Protesilaos Stavrou <info@protesilaos.com> writes:
>>
>>>> From: Philip Kaludercic <philipk@posteo.net>
>>>> Date: Sat, 15 Oct 2022 17:32:55 +0000
>>>>
>>>> * modus-operandi-theme.el: Add autoloaded theme properties.
>>>> * modus-vivendi-theme.el: Add autoloaded theme properties.
>>>>
>>>> As introduced in https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-10/msg00886.html.
>>>> ---
>>>>  modus-operandi-theme.el | 3 +++
>>>>  modus-vivendi-theme.el  | 3 +++
>>>>  2 files changed, 6 insertions(+)
>>>
>>> Installed the patch.  Thank you for this and for the work in emacs.git!
>>
>> Great.
>>
>> Just one meta-question, I hope there was nothing wrong with the patch,
>> because this was my first "real-world" experiment at using the new
>> `vc-prepare-patch' command that was recently added.
>
> It worked just fine.  I could not tell the difference.
>
> Since we are on the meta level: I use notmuch as my MUA.  While viewing
> a message, I invoke a command which appends its filesystem path to the
> kill-ring.  Then I switch to the relevant project and do 'git am PATH'.

This works because for notmuch each message is a message on the disk,
right?  I use Gnus with the IMAP backend, so this approach isn't
possible.  What I have been doing for a while when viewing a message
with a patch is M-x cd ... to the project directory, then just piping
the body through "git am" with the "|" binding.  Eli recently mentioned
that he just highlights the message and then runs M-| with "git am", but
this only works with attached patches.

Maybe these things could be mentioned in your patch article from earlier
this year?
Details
Message ID
<87lepg5deh.fsf@posteo.net>
In-Reply-To
<87y1tgfppq.fsf@protesilaos.com> (view parent)
DKIM signature
missing
Download raw message
Protesilaos Stavrou <info@protesilaos.com> writes:

>> From: Rudolf Adamkovič <salutis@me.com>
>> Date: Sat, 15 Oct 2022 23:25:14 +0200
>>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>
>>> As introduced in [...]
>>
>> BTW, we could also perhaps deprecate 'modus-themes-toggle' in favor of
>> 'toggle-theme' on Emacs 29.
>
> In principle, I am fine with this.  Though note that the themes support
> Emacs 27.1 and there will be no pressure to change that even after Emacs
> 29 becomes the new stable.

If interested, you could make this a conditional deprecation, along the
lines of

(when (fboundp 'toggle-theme) ;or something with version>=
  (define-obsolete-function-alias #'modus-themes-toggle #'toggle-theme
                                  "2022-10-16"))
Details
Message ID
<87tu44m4uk.fsf@protesilaos.com>
In-Reply-To
<87pmes5dhs.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Sun, 16 Oct 2022 09:22:55 +0000
>
> Protesilaos Stavrou <info@protesilaos.com> writes:
>
>>> From: Philip Kaludercic <philipk@posteo.net>
>>> Date: Sun, 16 Oct 2022 08:25:43 +0000
>>>
>>> Protesilaos Stavrou <info@protesilaos.com> writes:
>>>
>>>>> From: Philip Kaludercic <philipk@posteo.net>
>>>>> Date: Sat, 15 Oct 2022 17:32:55 +0000
>>>>>
>>>>> * modus-operandi-theme.el: Add autoloaded theme properties.
>>>>> * modus-vivendi-theme.el: Add autoloaded theme properties.
>>>>>
>>>>> As introduced in https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-10/msg00886.html.
>>>>> ---
>>>>>  modus-operandi-theme.el | 3 +++
>>>>>  modus-vivendi-theme.el  | 3 +++
>>>>>  2 files changed, 6 insertions(+)
>>>>
>>>> Installed the patch.  Thank you for this and for the work in emacs.git!
>>>
>>> Great.
>>>
>>> Just one meta-question, I hope there was nothing wrong with the patch,
>>> because this was my first "real-world" experiment at using the new
>>> `vc-prepare-patch' command that was recently added.
>>
>> It worked just fine.  I could not tell the difference.
>>
>> Since we are on the meta level: I use notmuch as my MUA.  While viewing
>> a message, I invoke a command which appends its filesystem path to the
>> kill-ring.  Then I switch to the relevant project and do 'git am PATH'.
>
> This works because for notmuch each message is a message on the disk,
> right?

Yes.  This is because the mail is stored locally by the mbsync script.
Gnus can work this way, though it needs the nnmaildir (I think) backend
instead of nnimap.  Gnus can also leverage notmuch for searching, but I
never managed to make it work at the time.

> I use Gnus with the IMAP backend, so this approach isn't possible.
> What I have been doing for a while when viewing a message with a patch
> is M-x cd ... to the project directory, then just piping the body
> through "git am" with the "|" binding.  Eli recently mentioned that he
> just highlights the message and then runs M-| with "git am", but this
> only works with attached patches.
>
> Maybe these things could be mentioned in your patch article from earlier
> this year?

Yes, I will need to update that post.  'vc-prepare-patch' would be my
preferred way now.  But I have not had the chance to use it yet.

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<87r0z8m4pn.fsf@protesilaos.com>
In-Reply-To
<87lepg5deh.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Sun, 16 Oct 2022 09:24:54 +0000
>
> Protesilaos Stavrou <info@protesilaos.com> writes:
>
>>> From: Rudolf Adamkovič <salutis@me.com>
>>> Date: Sat, 15 Oct 2022 23:25:14 +0200
>>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>> As introduced in [...]
>>>
>>> BTW, we could also perhaps deprecate 'modus-themes-toggle' in favor of
>>> 'toggle-theme' on Emacs 29.
>>
>> In principle, I am fine with this.  Though note that the themes support
>> Emacs 27.1 and there will be no pressure to change that even after Emacs
>> 29 becomes the new stable.
>
> If interested, you could make this a conditional deprecation, along the
> lines of
>
> (when (fboundp 'toggle-theme) ;or something with version>=
>   (define-obsolete-function-alias #'modus-themes-toggle #'toggle-theme
>                                   "2022-10-16"))

Good!  Do you want to prepare a patch or shall I do it from here?

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

>>>> Just one meta-question, I hope there was nothing wrong with the patch,
>>>> because this was my first "real-world" experiment at using the new
>>>> `vc-prepare-patch' command that was recently added.
>>>
>>> It worked just fine.  I could not tell the difference.
>>>
>>> Since we are on the meta level: I use notmuch as my MUA.  While viewing
>>> a message, I invoke a command which appends its filesystem path to the
>>> kill-ring.  Then I switch to the relevant project and do 'git am PATH'.
>>
>> This works because for notmuch each message is a message on the disk,
>> right?
>
> Yes.  This is because the mail is stored locally by the mbsync script.
> Gnus can work this way, though it needs the nnmaildir (I think) backend
> instead of nnimap.  Gnus can also leverage notmuch for searching, but I
> never managed to make it work at the time.

I used to use that too, but since I can take forever to compose a
message I frequently ran into issues with mbsync updating the underlying
files before I finished composing a message, which could mess stuff up.

>> I use Gnus with the IMAP backend, so this approach isn't possible.
>> What I have been doing for a while when viewing a message with a patch
>> is M-x cd ... to the project directory, then just piping the body
>> through "git am" with the "|" binding.  Eli recently mentioned that he
>> just highlights the message and then runs M-| with "git am", but this
>> only works with attached patches.
>>
>> Maybe these things could be mentioned in your patch article from earlier
>> this year?
>
> Yes, I will need to update that post.  'vc-prepare-patch' would be my
> preferred way now.  But I have not had the chance to use it yet.

Looking forward to that!  If you encounter any problems or have
suggestions on how the command can be improved, I am open to hearing
what you have to say!
Details
Message ID
<87fsfo3tvp.fsf@posteo.net>
In-Reply-To
<87r0z8m4pn.fsf@protesilaos.com> (view parent)
DKIM signature
missing
Download raw message
Protesilaos Stavrou <info@protesilaos.com> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Date: Sun, 16 Oct 2022 09:24:54 +0000
>>
>> Protesilaos Stavrou <info@protesilaos.com> writes:
>>
>>>> From: Rudolf Adamkovič <salutis@me.com>
>>>> Date: Sat, 15 Oct 2022 23:25:14 +0200
>>>>
>>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>>
>>>>> As introduced in [...]
>>>>
>>>> BTW, we could also perhaps deprecate 'modus-themes-toggle' in favor of
>>>> 'toggle-theme' on Emacs 29.
>>>
>>> In principle, I am fine with this.  Though note that the themes support
>>> Emacs 27.1 and there will be no pressure to change that even after Emacs
>>> 29 becomes the new stable.
>>
>> If interested, you could make this a conditional deprecation, along the
>> lines of
>>
>> (when (fboundp 'toggle-theme) ;or something with version>=
>>   (define-obsolete-function-alias #'modus-themes-toggle #'toggle-theme
>>                                   "2022-10-16"))
>
> Good!  Do you want to prepare a patch or shall I do it from here?

I'd be fine with you taking over.
Details
Message ID
<87pmer7q4n.fsf@protesilaos.com>
In-Reply-To
<87fsfo3tvp.fsf@posteo.net> (view parent)
DKIM signature
missing
Download raw message
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Sun, 16 Oct 2022 11:11:54 +0000
>
> [... 21 lines elided]

>>> If interested, you could make this a conditional deprecation, along the
>>> lines of
>>>
>>> (when (fboundp 'toggle-theme) ;or something with version>=
>>>   (define-obsolete-function-alias #'modus-themes-toggle #'toggle-theme
>>>                                   "2022-10-16"))
>>
>> Good!  Do you want to prepare a patch or shall I do it from here?
>
> I'd be fine with you taking over.

Just pushed the change.  Thank you!

    commit 59da1b35112e1becb6e2c3912a417d28a22ac8ce
    Author: Protesilaos Stavrou <info@protesilaos.com>
    Date:   Sun Oct 16 18:16:33 2022 +0300

        Deprecate modus-themes-toggle in Emacs 29

        This is done to be consistent with the work done in emacs.git.  Thanks
        to Philip Kaludercic and Rudolf Adamkovič for their feedback on the
        mailing list:
        <https://lists.sr.ht/~protesilaos/modus-themes/%3C877d116lh4.fsf%40posteo.net%3E>.

     modus-themes.el | 6 ++++++
     1 file changed, 6 insertions(+)


-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<87y1tdeeyw.fsf@protesilaos.com>
In-Reply-To
<m2lepgrd8l.fsf@me.com> (view parent)
DKIM signature
missing
Download raw message
> From: Rudolf Adamkovič <salutis@me.com>
> Date: Sat, 15 Oct 2022 23:25:14 +0200
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> As introduced in [...]
>
> BTW, we could also perhaps deprecate 'modus-themes-toggle' in favor of
> 'toggle-theme' on Emacs 29.

Good day folks!

I reverted the deprecation because it is more intrusive than I had
thought:

    commit d9e454603155d0bd73e6b6ac0bee4e370e30b701
    Author: Protesilaos Stavrou <info@protesilaos.com>
    Date:   Tue Oct 18 11:00:22 2022 +0300

      Revert modus-themes-toggle obsolete

      The 'toggle-theme' is not functionally equivalent to the command
      'modus-themes-toggle' due to the optional arguments it accepts.  With
      'toggle-theme' we are prompted to confirm loading the theme.  We also
      get a second prompt that tells us how unsafe themes can be...  This is
      consistent with how 'load-theme' works, but is not what the user of
      'modus-themes-toggle' has come to expect.

      Users who do not like to maintain a 'custom-file' are thus penalised
      each time they invoke the command.  I will proceed with this
      deprecation, if there is, say, a user option in Emacs that disables
      those prompts each time a theme is loaded.  Basically, we need an
      arrangement that just toggles themes without questions.

      This commit reverts 59da1b3, 0260109.

      Read the discussion on the mailing list with the participation of
      Philip Kaludercic and Rudolf Adamkovič:
      <https://lists.sr.ht/~protesilaos/modus-themes/%3C877d116lh4.fsf%40posteo.net%3E#%3Cm2lepgrd8l.fsf@me.com%3E>.

Sorry about this back-and-forth!

All the best,
Prot

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