Sacha Chua

How I use Emacs


I used to use PlannerMode a lot. Then I switched my blog to Wordpress ( and started using Emacs Org + Toodledo for my task management. Now I use org2blog to post some entries from my Giant Org File of Awesomeness.


I used to use Gnus, the built-in mail/newsreader that slices, dices and juliennes - not as easy to integrate into a Windows-based workflow, though. When I used it, I had basic splitting set up to file my mail into separate groups neatly organized in a hierarchical tree that allows me to see at a glance how much mailing list messages I’ve received. I used “c” to catch-up groups or even whole subtrees, mark threads as read or even uninteresting. Adaptive scoring meant that I don’t have to manually specify my reading preferences - gnus learned what I don’t like to read, so that I don’t have to read related messages next time unless I really want to. I’d set it to score down all messages from hotmail or aol unless I like the author. ;) I elided mailing list identifiers so I don’t see those [….] things, banners like the ads at the end of yahoogroups, really long signatures or To: headers. Gnus is definitely a mail/newsreader for the netiquette-sensitive. :-)

BbdbMode integrated well with Gnus, so I could easily bring up or create contact records for the people I receive mail from. I had Gnus automatically add notes for the people I know, and it’s interesting to see what mailing lists people are subscribed to. I could add notes, check phone numbers, and even see when someone wrote me last. (Time to write a “Haven’t heard from you in a while!” note…)

Mail is a somewhat dangerous thing to experiment with, of course. :-) I had lost some outgoing mail due to masqmail silently failing if you specify the -f flag (evil!), but some debugging later turned up a message-sendmail-f-is-evil variable I could set to t. I have since then moved to postfix so that I could use + as an address separator, so I haven’t needed that.

(outdated - I no longer send text messages from my computer. I’m in Canada now, and text messages are expensive!)

Ah, yes, text messaging. SMS is pretty big here in the Philippines. I am a lazy computer geek who would rather type than fish out my cellphone and start texting. Besides, I kinda like having all of my text messages stored on my laptop - search, store, reply, and even see threaded displays. :-) I used to use gnokii, alamin, postfix, bbdb and gnus in order to have practically seamless SMS sending. :-) Here’s how it works. I’ve set up alamin (a GSM-SMS gateway that can talk to a gnokii-supported phone) to poll my cellphone for incoming text messages and convert any such to e-mail messages from alamin+<SOMENUMBER>@localhost to sacha@localhost. I receive those messages in Gnus in my mail.text group, and BBDB steps in to fill in the name from my contact database thanks to (gnus-summary-line-format “%U%-40,40uB %S\n”), (bbdb/gnus-summary-prefer-bbdb-data t) and (bbdb/gnus-summary-prefer-real-names ‘bbdb) in the group parameters. My reply is processed by postfix and piped through email2sms, a short Perl script I wrote that just invokes alamin’s client program. Alamin queues the message and tries to resend it at regular intervals until it is finally sent. No more dealing with “Message failed.” or lack of signal, and I get a full record of all of my text messages, and I can text while in class.. ;) Unfortunately, I don’t have a serial port any more, and my phone is not Linux-friendly. Can’t pull off this neat hack these days.

Taking notes

I keep my notes in plain text files. I find that typing on my laptop encourages me to keep more complete notes because I can type faster than I handwrite (and it’s much less tiring!). OrgMode makes it easy to keep my notes in outline mode.

Internet relay chat

ERC! EmacsIRCClient forever. Well, not really forever, but I’ve tried quite a few Internet relay chat clients and I must say that ERC is really cool. erc-track lets me keep track of channels that have changed even though I’ve got my notes maximized, and since it’s part of my editor I can easily cut/paste/navigate/tweak/do-funky-stuff. I hang out on Freenode #emacs, and it’s tons of fun.




  • 00:00 UTC Weekly review: Week ending May 7, 2021
    • Plover and stenography:
      • I modified the Plover engine to add always-on stuff
      • I made it easier to repeat the same drill in Stenojig from Emacs.
      • I added websocket commands for adding translations and looking them up by stroke or by translation.
      • I started checking out evil mode, since I'll probably need a better way to launch keyboard shortcuts when I try to do steno more often.
    • Garden:
      • We bought some seeds, soil, and tomato cages.
      • We tidied up the right side of the garden, moving some of the tiger lilies into the bare spot and preparing to straighten the garden border. A- did a good job of entertaining herself by running up and down the garden and by sunning herself on the deck.
      • A- was excited about adding Shake and Feed fertilizer.
      • We spread some cedar mulch.
      • A- helped scatter grass seed.
      • A- helped W- spray nematodes in the garden.

    Blog posts


    Category The other week % Last week % Diff % h/wk Diff h/wk
    Discretionary - Productive 11.3 17.4 6.1 29.3 10.2
    Unpaid work 3.7 7.2 3.5 12.2 6.0
    Personal 6.4 7.1 0.7 12.0 1.2
    Business 0.0 0.5 0.5 0.9 0.9
    Discretionary - Play 0.5 0.2 -0.3 0.4 -0.5
    A- 43.4 38.1 -5.2 64.1 -8.8
    Sleep 34.6 29.3 -5.4 49.2 -9.0

    I stayed up late to learn more about stenography.



  • 00:00 UTC Weekly review: Week ending April 30, 2021
    • ox-11ty:
      • I added inherited tags to ox-11ty.
      • I modified ox-11ty to copy images to the post directory.
    • Emacs:
      • I figured out how to use Consult to retrieve my journal entries asynchronously.
    • Garden:
      • We're experimenting with different planters for the strawberries. W- bored 2 1/4"-inch holes into a plastic planter, and I sewed grow bags for the strawberries using landscape fabric.
      • W- dug up the edging in the garden.
    • Other:
      • I pinged Jane about the Georgi order. It turned out that it might not actually have gotten shipped, so she's getting that sorted out.
      • I made a fabric flower.
      • We brought the plants in because we're expecting heavy winds and some snow.
    • Plover and stenography:
      • I figured out how to poke around Plover's source and how to fix plover_websocket_server so that it wouldn't chomp my last character.
      • I wrote some code to control Plover from Emacs via the plover engine server plugin.
      • I'm still in the stage of reading a gazillion books out loud to A-. I've been sneakily using it as first-letter-of-words steno practice with the hand that's not pointing to what I'm reading, which has the side benefit of slowing my reading down so that it's easier for her to understand things. Mwahaha!

    Blog posts


    Category The other week % Last week % Diff % h/wk Diff h/wk
    Discretionary - Productive 5.0 11.3 6.3 19.0 10.6
    Personal 4.4 6.4 2.1 10.8 3.5
    Unpaid work 3.0 3.7 0.7 6.2 1.1
    Discretionary - Play 0.9 0.5 -0.3 0.9 -0.6
    Sleep 36.1 34.6 -1.4 58.2 -2.4
    Business 1.5 0.0 -1.5 0.0 -2.6
    A- 49.1 43.4 -5.7 72.9 -9.6




  • 00:00 UTC Emacs Hydra: Allow completion when I can't remember the command name

    So it turns out that I'm pretty much zonked after a day with the kiddo and have a hard time remembering keystrokes or speed-reading my Hydra cheat sheets. I want to be able to use M-x-like completion in my Hydra so that I can type a few characters and then maybe see the shortcuts there. Here's what it looks like:


    Figure 1: Hydra completion

    (defun my/hydra-format-head (h)
      (let ((key-binding (elt h 0))
            (hint (elt h 2))
            (cmd (and (elt h 1) (prin1-to-string (elt h 1)))))
        (if cmd
            (format "%s (%s) - %s" hint key-binding cmd)
          (format "%s (%s)" hint key-binding))))
    (defun my/hydra-current-heads-as-candidates ()
      (let ((base (replace-regexp-in-string "/body$" "" (symbol-name hydra-curr-body-fn))))
        (mapcar (lambda (h)
                  (cons (my/hydra-format-head h) (hydra--head-name h (intern base))))
                (symbol-value (intern (concat base "/heads"))))))
    (defun my/hydra-execute-extended (prefixarg &optional command-name typed)
      (declare (interactive-only command-execute))
      (interactive (let ((execute-extended-command--last-typed nil)
                         (candidates (my/hydra-current-heads-as-candidates)))
                     (list current-prefix-arg
                           (completing-read "Cmd: " candidates)
      (let* ((candidates (my/hydra-current-heads-as-candidates))
             (bind (assoc-default command-name candidates 'string=)))
         ((null bind) nil)
         ((hydra--callablep bind) (call-interactively bind)))))

    This is how I add it to all my hydras:

    (with-eval-after-load 'hydra
      (define-key hydra-base-map (kbd "<tab>") #'my/hydra-execute-extended))

    Proooobably works? Very rough. Might be useful for those fuzzy-brain days.

    This is part of my Emacs configuration.
  • 00:00 UTC Weekly review: Week ending April 23, 2021
    • I added NODE_ENV=production to some of my Docker images.
    • I fixed some of my blog pages. I replaced my, sachac-weekly, and sachac-yearly feeds with redirects to my static feeds.
    • I reviewed a number of my old blog posts.
    • I sewed another long dress for A-.

    Blog posts


    Category The other week % Last week % Diff % h/wk Diff h/wk
    Sleep 30.6 36.1 5.4 60.6 9.1
    Unpaid work 1.8 3.0 1.2 5.1 2.0
    Business 0.8 1.5 0.8 2.6 1.3
    A- 48.8 49.1 0.3 82.5 0.6
    Discretionary - Play 0.8 0.9 0.1 1.5 0.1
    Personal 4.6 4.4 -0.2 7.3 -0.4
    Discretionary - Productive 12.6 5.0 -7.6 8.5 -12.7