Change Org Mode TODO keyword color based on the state and the current Modus theme

| emacs, org

I use modus-theme-toggle to switch between modus-vivendi-tinted and modus-operandi-tinted depending on whether I want a dark background or a light one. I also customize my org-todo-keyword-faces to visually distinguish TODO, DONE, WAITING, and SOMEDAY. This is how to colour them based on the current Modus theme.

(defun my-org-todo-set-keyword-faces ()
  (setq org-todo-keyword-faces
        `(("TODO" . (:foreground ,(modus-themes-get-color-value 'blue-warmer) :weight bold))
          ("DONE" . (:foreground ,(modus-themes-get-color-value 'green-warmer) :weight bold))
          ("WAITING" . (:foreground ,(modus-themes-get-color-value 'red-warmer) :weight bold))
          ("SOMEDAY" . (:foreground ,(modus-themes-get-color-value 'fg-dim) :weight bold))))
  (when (derived-mode-p 'org-mode)
    (font-lock-fontify-buffer)))
(with-eval-after-load 'modus-themes
  (add-hook 'modus-themes-after-load-theme-hook #'my-org-todo-set-keyword-faces))
2024-10-14-17-21-48.svg
Figure 1: Light background
2024-10-14-17-22-31.svg
Figure 2: Dark background
This is part of my Emacs configuration.
View org source for this post

2024-10-14 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Mastodon #emacs, Hacker News, lobste.rs, programming.dev, lemmy.world, lemmy.ml, communick.news, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar, and emacs-devel. Thanks to Andrés Ramírez for emacs-devel links. Do you have an Emacs-related link or announcement? Please e-mail me at sacha@sachachua.com. Thank you!

View org source for this post

Wednesday weblog: Toots ending 2024-10-09

| review

Here's what I've been posting on @sacha@social.sachachua.com:

View org source for this post

Yay Emacs 5: Tweaking my video workflow with WhisperX and subed-record

| emacs, subed, yay-emacs

I'm tweaking my video workflow. I use Orgzly Revived on my Android phone to write the text, and I use Easy Voice Recorder to record it. Syncthing automatically copies both to my laptop. I use WhisperX to transcribe my recording, and I use a little bit of Emacs Lisp to figure out timestamps for each word. I edit this to fix errors. I can even rearrange things and get rid of umms or ahs or anything I don't want.Then I use subed-convert to turn it into a VTT file. I can tweak the start and end times by looking at the waveforms. Then I add comments with the visuals I want. I can add images, animated GIFs, or videos, and they're automatically squeezed or stretched to fit. I can also have them play at original speed. Then I set up open captions and use subed-record-compile-video. Tada!

Links:

You can watch this on YouTube, download the video, or download the audio.

View org source for this post

2024-10-07 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Mastodon #emacs, Hacker News, lobste.rs, programming.dev, lemmy.world, lemmy.ml, communick.news, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar, and emacs-devel. Thanks to Andrés Ramírez for emacs-devel links. Do you have an Emacs-related link or announcement? Please e-mail me at sacha@sachachua.com. Thank you!

View org source for this post

Wednesday weblog: Toots ending 2024-10-02

| review
Tech
  • Server upgrade 2024-10-01T19:34:35.535Z

    Okay, my VPS should now be on Ubuntu 24.04 LTS. Things I bumped into along the way:
    - Had to reinstall MySQL for some reason. Fortunately kept all the data, although I did need to recreate directories for logs and sockets.
    - Reinstalled my Docker images. Fortunately kept all the data on disk, so that was fine. Along the way, upgraded my mongo DB from 4.2 to 4.4 to 5 to 6 to 7.
    - Panicked when gotosocial was taking a while to start up, interrupted it and tried again, ended up with a partially-migrated database and worse problems. Fortunately had a backup of the db, so I restored and patiently waited.

  • Eleventy upgrade 2024-09-30T17:35:26.858Z

    I managed to get my blog upgraded from Eleventy 2 to Eleventy 3.0.0-alpha.20. find-dired and wdired were useful for finding all the .js files and turning them into .cjs.

  • Supernote colour template 2024-09-27T03:05:15.033Z

    I finally got around to checking if the #Supernote can handle colour templates despite only letting me draw in black, white, and two shades of gray. It keeps the colour in the export! That means I can make a template that uses a specific color to make a grid, which is then easy to strip out of it with Python. That saves me 3-6 taps and reduces friction even further. Looking forward to experimenting with that at the next opportunity.

  • Blog tweaks and other code - 2024-09-26T17:02:17.804Z

    A couple of little tweaks:

    - I re-added a "Random" link to my blog header, nudged by https://news.ycombinator.com/item?id=41647654
    - I added a sitemap.xml , so let's see if search engines pick stuff up
    - I wrote some code to move Org properties from a subtree to a parent
    - I changed my code for inserting the latest file from my Supernote A5X e-ink device into Org Mode to also recolor, recognize text, rename, and archive the file

  • Setting up hibernate 2024-09-26T00:08:50.365Z

    I followed the directions at https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/ to set up a swap partition and enable hibernate. Now I can pause whatever I'm doing in Linux in order to switch to Windows to play Minecraft Bedrock with the kiddo, and then switch back to Linux afterwards.

Life
View org source for this post

2024-09-30 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Mastodon #emacs, Hacker News, lobste.rs, programming.dev, lemmy.world, lemmy.ml, communick.news, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar, and emacs-devel. Thanks to Andrés Ramírez for emacs-devel links. Do you have an Emacs-related link or announcement? Please e-mail me at sacha@sachachua.com. Thank you!

View org source for this post