2025-03-03 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Mastodon #emacs, Bluesky #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

Monthly review: February 2025

| monthly, review

Text and links from sketch (, and) a list of emojis per day

February 2025

  • field trips
  • birthday
  • music and art

By day:

  1. 👀 looking ahead
  2. 💃 dance
  3. ✅ curriculum checklist
  4. 🖼️ Art Gallery of Ontariqo
  5. 🤖 MakeyMakey
  6. 🐕 sheepdog realizations
  7. 📱 iPad experiments
  8. 📲 my own iPad
  9. 🛷 sledding
  10. 📸 sorting through photos
  11. 🎨 drew a review of A+'s 8th year
  12. 🏢 Moments in Modernism
  13. 🛷 sledding snow day
  14. 🎤 piano and voice
  15. ☃️ even more snow
  16. ❄️ quinzhee
  17. 🍪 galaxy cookies
  18. 🚲 shovelling trail walkway
  19. 📝 individual assessment
  20. 🧁 cupcakes
  21. 🧁 icing
  22. ⛸️ skating party
  23. ❄️ breaking up ice
  24. 🌀 Minecraft Parkour Spiral 2
  25. ⛸️ more skating
  26. 📈 results: growth, exceptionality
  27. 🤖 Comparing Claude and ChatGPT
  28. 🔍 word search

This month, A+ asked me if we could do a field trip. Since her virtual grade 3 class was doing a unit on drawing landscapes, I thought I'd take her to the Art Gallery of Ontario so that she could practise digital painting surrounded by lots of great examples. I enjoyed that enough to get my own iPad for drawing on. She asked for another field trip the following week to check out the Moments in Modernism exhibit, so we got to practise digital painting together. (We ended up back in the landscape gallery.) I wonder what we'll explore next month.

Being able to do iPad things together also nudged us to explore music and art. I experimented with paying for the Simply family subscription. A+ and I have been practising singing and piano, and W- has been practising patience. I've been going through the art tutorials too. A+ has run out of colourful drawings to work on and is not particularly interested in the pencil courses, so maybe that'll be for later.

It was A+'s birthday this month. She wanted to have a skating party with just her closest friends and their families. We made and decorated cupcakes and cookies, and then we brought her and the party supplies over to the park in our cargo bikes. W- brought over pizza and hot chocolate. I enjoyed drawing a one-page summary of A+'s 8th year, and that also helped other people get a sense of what we've been up to the rest of the year. I used parts of that drawing for little thank-you cards for her friends, too.

Lots and lots of snow this month. It's amazing how much some guerilla shovelling can make a difference. We cleared the entrance to the Martin Goodman Trail closest to our house, and W- also cleared some things in our neighbourhood and on our bike ride home.

Checking in with myself

I noticed I've been a little more fretful than I'd like to be. I think I've been letting myself get all tangled up in worries about A+ and school fit, and I've also been staying up late exploring sketching. My current plan is:

  • schedule fretting for Saturdays so that I don't fret too much at A+ during the week
  • remind myself of counterexamples: A+ does actually get her work done, and she's pretty good at making decisions; even if she messes up, failure is feedback
  • externalize my anxiety by calling her "Gumamelon" (long story), and thank her for showing up and trying to protect us and make life easier
  • try to get better at detecting when Gumamelon is sneaking up on me, write down her concerns, and remind her that she can come back on Saturday.
  • distract Gumamelon with other things I can do
  • sleep better

It's weird, but maybe it'll help. =)

Also, trying out this approach of answering reflection questions in order to think more deeply.

Where did I feel most energized this month? What activities drained me?

I liked figuring things out with W- and A+, whether it was breaking up the ice on the walkway or redoing the galaxy icing on the cupcakes. I also liked the calmness of going through the music and art tutorials, even if they felt quite slow at times. I'm not too keen on the frazzled feeling of fretting at A+, but I'm glad I'm getting better at recognizing the irrationality of it, and that both W- and A+ are good at reminding me to back off. I'm looking forward to finding ways to redirect that. This might be the time to get back into exploring the things I want to learn. That'll keep me plenty busy.

What moments made me say "aha!" this month?

It's interesting to see how both A+ and I respond well to impersonal feedback from a computer and to breaking things down into bite-sized, gamified learning. The pitch visualizations in the singing app have been helping her pay more attention to melody. I like the way the notes in the piano app don't let me move forward until I get them right. I'm going to experiment with pitch detection to practise singing scales. I want to see if I can get Claude AI to give me reasonably-useful writing feedback, too.

Emoji summary

Nudged by Gina Trapani's My Life in Weeks (found via HN) and the Life in Weeks app (also discussed on HN), I'm noodling around the idea of having a quick but expressive overview. I have a journal covering most of the days since 2016, somewhat spotty coverage of weekly/monthly notes before then, and yearly reviews going back to 2005. If I wanted to summarize each day with an emoji, February would be:

👀💃🖼️🤖🐕📱📲🛷📸🎨🏢🛷🎤☃️❄️🍪🚲📝🧁🧁⛸️❄️🌀⛸️📈🤖🔍

Which is promisingly compact and could be fun to experiment with over the year, and then maybe I could pick weekly highlights too.

Anyway, in March, I'd like to:

  • Practise being calmer and more easygoing; get better at thinking in terms of experiments
  • Take A+ on more informal field trips: Royal Ontario Museum, pottery class
  • Start digging into the ideas and tasks I've been postponing
  • Finish the Simply Piano course and start working on sheet music for the songs A+ wants to sing
  • Practise singing scales while waiting for A+ to catch up with Simply Sing
  • Automate the BigBlueButton setup a bit more so that I don't forget about meetups

Sketches

Time

Category Previous month % This month % Diff % h/wk Diff h/wk
A- 35.6 41.9 6.3 63.5 10.6
Business 2.0 2.4 0.4 3.6 0.7
Discretionary - Family 0.0 0.1 0.1 0.2 0.2
Discretionary - Play 0.6 0.2 -0.4 0.3 -0.7
Discretionary - Productive 11.7 11.2 -0.6 16.9 -1.0
Personal 8.6 7.4 -1.1 11.3 -1.9
Sleep 35.4 33.9 -1.4 51.5 -2.4
Unpaid work 6.2 3.2 -3.0 4.8 -5.0

Hmm, definitely want to get more sleep.

View org source for this post

Two weeks with the iPad Air (+ SuperNote A5X and Lenovo P52)

Posted: - Modified: | geek, tech, ipad

[2025-03-01 Sat]: Genaro suggested beorg, so now I've got that on my iPad and it seems to be doing fine for browsing my Org Mode files. I think I'll set up WebDAV on our network-attached storage (NAS) and see what that's like, too.

Also, apparently, it's been about three weeks, whoops!

I've had this iPad Air 13" for about two three weeks now, and I'm slowly settling into how the different pieces of tech can work together and how things can flow.

Text from sketch

Getting used to SuperNote A5X + iPad Air 13"

SuperNote A5X:

  • I prefer it for writing, sketchnotes
    • pen feel
    • strokes: exactly as I expect, no hooks or smoothing
    • lighter weight
    • no backlight
  • Also nice for reading EPUBs, PDFs

iPad Air:

  • Libby for library e-books
  • Procreate, Simply Draw for art
  • NetNewswire for RSS
  • Copying & pasting is nice

Procreate replaces spaces with underscores and doesn't overwrite files. Instead, it adds 2 to the filename.

I want to start building up thought maps so I can see quick summaries and open questions. The laptop is probably the best place to do it.

Org Mode files with sketches, text, and links

  • Export to HTML
  • Also, add export to HTML gallery view?

Private sketches: Available through DS

Private web server on the NAS? I can just run my sketch viewer.

DS: Synology NAS drive

  • Program the server to consolidate files?
  • Consider moving metadata to subdir for easier flipping?

Ideas for next steps:

  • Figure out easier doodling from iPad: resample, autocrop, insert with HTML markup
  • Automate recolour/rename from Dropbox (phone? server?)

On the iPad, I've been mostly using:

Moving data around is a bit of a hodgepodge: internal webserver or Dropbox for the Supernote, Dropbox and Synology's DS Drive for the iPad, and Syncthing for the server. I'm sure that'll settle down eventually as I figure out a better flow.

Untitled_Artwork.jpg

I like how drawing, singing, and playing the piano give me a way to distract myself from the urge to nag A+. Still definitely just starting out, but it's fun anyway. It's nice to be able to breeze through library e-books again, too.

I notice I've been missing the occasional calendar reminder from my phone, so that's probably a sign that I need to (a) set up the iPad for calendar access as well, (b) have more distinct notifications on my phone, and (c) take the phone with me as I go from room to room. On the plus side, that probably means I've been getting in the zone, yay! It seems a little easier to just take the whole stack of phone+Supernote+iPad when I move rooms instead of leaving them in different places and then having to go find them. The laptop is a lot heavier, though, so I tend to move that on an as-needed basis.

I set up a copy of sketches.sachachua.com server on the NAS (so it's just on the local network) pointing to my private sketches directory, so now I can flip through my private sketches fairly easily. They're mostly just various thoughts on parenting and emotions and life. Now I can review them from either my iPad or my laptop, yay!

Ideas for next steps:

  • Keep distracting myself from fretting about A+ by completing various art/music tutorials.
  • Have fun doodling.
  • Contemplate whether I want to read my Org files on the iPad, and what the best way of doing it might be. (Organice? PlainOrg? Just do a PDF/EPUB export of stuff I'm focusing on? - update 2025-03-01: added Beorg)
  • See if A+ is up for field trips to the art gallery or museum.

The iPad Air seems like a good addition. Let's see what I can do with it.

View org source for this post

Letting A+ play with generative artificial intelligence for fiction, and a primer

Posted: - Modified: | ai

[2025-03-01 Sat]: After experimenting with ChatGPT in depth, A+ has decided that she prefers Claude, so we'll try that.

A+ likes prompting Claude AI to generate funny kid-focused Star Wars fanfic mostly exploring how various characters might babysit Luke, Leia, and Grogu in a universe where Anakin did not fall to the Dark Side. This seems to be working out well. It encourages her to improvise stories even when we're off-screen, and it lets her play with small variations on ideas and quickly try things out. The stories that Claude generates are humorous and descriptive, with better dialogue and characterization than I might come up with myself. This is infinitely better than letting her wander around fanfiction.net on her own.

She often runs into the free tier's usage limits. There are plenty of other things she enjoys doing, so it's not a problem. She just goes on to read other things, practise singing, or colour. Still, we've been noodling around the idea of paying for a subscription, especially if we can help her get even more out of it. For example, maybe we could build some routines like:

  • Daily: Tell me your favourite story of the day. What did you like about it? What was the problem and what was the solution?
  • Weekly:
    • Check in to see if you're all caught up with schoolwork
    • Pick a story and let's draw a quick scene from it together; maybe I can compile it into a little PDF we can enjoy
  • Once a month:
    • Record one story out loud (~ 250 words, so a couple of minutes)

(I know, I know, it's pretty aspirational. But maybe I can sneak some of it in here and there, especially if I start doing it myself. Then she usually wants to join in.)

Prompt engineering

A+ currently writes prompts like:

  • Write a funny story where Darth Vader has a bunch of body doubles (like Queen Amidala did) and they have a very important meeting. The Emperor is trying to find Darth Vader and keeps finding the body doubles instead.
  • Write a silly story where Anakin raises Luke and Leia with Padme instead of turning to the dark side.
  • Write a continuation of The Skywalker Family Chronicles where Anakin is helping Luke and Leia get dressed for a very important Bring Your Children to a Council meeting.
  • Write a funny continuation of The Skywalker Family Chronicles about the time that Captain Rex brought the rest of the 501 Legion and Commander Cody's Legion to help babysit Luke and Leia.
  • Write a continuation of The Skywalker Family Chronicles where Commander Cody has to babysit Luke and Leia because Captain Rex is dealing with leftover Separatist droids and has to call in reinforcements who run into the Skywalker Naboo Lake House, fully armed, and wearing their full armor, asking whether his problem is either rouge Separatists droids or the Skywalker children and bringing two bags of military equipment and two bags of Skywalker Specific Stress Depleters and other things for babysitting.
  • Write a continuation of The Skywalker Family Chronicles where Grogu reads his journal, flipping to the page where Padme takes Ahsoka, Anakin, Yoda, Grogu, still talking and potty training, Luke, and Leia to a boat ride, but it turns out Yoda, Anakin, Luke, Ahsoka, and Leia get seasick, told from Grogu's point of view in detail.
    • It was interesting to see this prompt evolve over 16 iterations starting from "Write a continuation of The Skywalker Family Chronicles where Padme takes Anakin, Luke, and Leia to a boat ride, but it turns out that boat rides become disasters for Skywalkers."
  • Write a continuation of The Skywalker Family Chronicles where Ahsoka reads her journal, ending up on the page where she ends up at the Senate Medical Center due to some flu that only Togrutas can catch, the journal written in slightly squiggly handwriting, which is either Grogu or Anakin's handwriting.
The story Claude generated for that prompt

Ahsoka's Journal — Entry #47

[The handwriting is notably messy and inconsistent, with some letters larger than others and lines that don't quite stay straight across the page]

Dear Snips Journal Ahsoka's Top Secret Thoughts Today's Very Important Record of Events

Anakin here. Ahsoka is sick in bed with Togrutan Spotted Fever (which is apparently a thing??), so I'm writing this for her because she made me promise to "keep her journal updated" and threatened to tell Padmé about the speeder bike incident if I didn't. So here we are.

Medical droid says she'll be fine in a few days but needs rest. She keeps trying to get up to train, so I'm taking dictation between making her stay in bed. Her exact words: "Make sure you get everything right, Master, or I'll know."

This is ridiculous Here's what happened:

It started three days ago when Ahsoka's lekku developed these weird purple spots. She insisted it was "just a cosmetic phase all Togruta go through" and refused to see a healer. Then she collapsed during lightsaber practice, which was TERRIFYING, by the way. Not that I panicked. I was very calm and collected as I carried her across the Senate District while shouting for people to move out of the way.

The twins kept trying to "help" by Force-pushing pedestrians, which didn't actually help AT ALL. Leia claims "that man was going to step on Ahsoka's lekku" but I'm pretty sure she just wanted to see if she could push someone into a fountain. (She could.)

Luke tried to use the Force to make Ahsoka float "so you don't have to carry her, Dad" but only managed to make her boots come off. One hit Senator Organa right in the back of the head. I'll have to apologize for that later.

When we got to the Senate Medical Center, the droid at reception just stared at us like we were crazy. In my defense, it's not every day a former Jedi Knight runs in carrying an unconscious Togruta while two Force-sensitive five-year-olds make medical equipment float around the waiting room.

Padmé arrived looking perfect as always, somehow already briefed on the situation. She claims she "felt a disturbance in the Force, and that disturbance was you causing chaos, Anakin." She's not even Force-sensitive! How does she KNOW these things??

The medical droid diagnosed Ahsoka with "Togrutan Spotted Fever" which apparently only Togruta can catch. The spots spread all over her lekku and montrals before the fever kicked in. The droid said it's like "human chicken pox but confined to head-tails" which is both fascinating and disgusting.

Grogu seemed very interested in the spots, kept trying to touch them until Ahsoka made that scary growling noise. Now he brings her soup instead. At least I think it's soup. It's green and bubbling and I'm a little afraid to ask what's in it, but Ahsoka seems to like it.

Obi-Wan stopped by with "medicinal tea" which smelled terrible but made Ahsoka laugh so hard she snorted bacta solution out her nose. Something about a mission where I apparently got similar spots in an inappropriate location? I DON'T REMEMBER THIS AND IT NEVER HAPPENED.

Oh, Ahsoka wants me to add:

"Master Yoda visited and said 'Strong with the antibodies, you must be.' He brought me a weird root that tasted awful but made my headache go away. Also, tell the younglings the spots are NOT for coloring practice!" Speaking of which, I caught Luke trying to "connect the dots" on Ahsoka's lekku with a marker while she was sleeping. Leia was standing lookout. I'm simultaneously proud of their teamwork and horrified by their choices. Padmé has now banned everyone except medical droids from the sick room after Ahsoka's fever spiked when Rex brought the entire 501st to "boost morale." Apparently twenty clone troopers singing get-well songs isn't restful. Who knew?

Ahsoka is falling asleep now, but insists I note that "Anakin's nursin g skills are terri bl…"

She didn't finish that sentence because she's WRONG and also finally sleeping. I am an EXCELLENT caretaker! I've only spilled bacta solution twice, and the second time wasn't even my fault because R2 bumped into me. I should wrap this up. Padmé says my handwriting is getting worse, which I didn't think was possible. Also, Grogu is trying to add his own notes in the margins and I can't tell if those are drawings or actual words. Get better soon, Snips. The twins miss their "Auntie 'Soka" and I miss having someone else to blame when things go wrong.

— Anakin

[In the corner, there appears to be a small green handprint with what might be Grogu's attempt at writing "Get better" beside it]

All right, let's get a bit meta here. "Here are some prompts that my 9-year-old child has been using to generate funny Star Wars fanfiction in alternate timelines. Suggest 5 ideas for improving her prompts and provide detailed examples." We're out of free messages for Claude, so I asked ChatGPT.

It suggested:

  1. Be more specific about the chaos or conflict.
  2. Add unexpected reactions from characters.
  3. Use a "What If?" format to spark creativity.
  4. Introduce a clear perspective or narrator.
  5. Add an absurd or over-the-top element.
Full response including examples and details

Your child already has a fantastic imagination and a great sense of humor! Here are five general tips to help improve and refine her prompts for even funnier and more engaging Star Wars fanfiction:

1. Be More Specific About the Chaos or Conflict

  • Funny stories often work best when there's a strong contrast or a big misunderstanding. Adding more details about what could go wrong will make the story even funnier.
  • Example: Instead of: "Write a funny story where Darth Vader has a bunch of body doubles, and the Emperor keeps finding them instead." Try: "Write a story where Darth Vader has a dozen body doubles, but they're all terrible actors who keep revealing they're fakes in ridiculous ways. The Emperor gets increasingly frustrated as he accidentally promotes one to Grand Moff, challenges another to a lightsaber duel, and gets tricked by one into approving a Death Star Karaoke Night."

2. Add Unexpected Reactions From Characters

  • One of the funniest things in fanfiction is when characters react in ways they normally wouldn't. Encourage your child to play with unexpected character reactions.
  • Example: Instead of: "Write a silly story where Anakin raises Luke and Leia with Padmé instead of turning to the dark side." Try: "Write a story where Anakin raises Luke and Leia with Padmé, but he's the most overprotective parent in the galaxy. He installs lightsaber-proof baby gates, interrogates their playdates like a Jedi Council trial, and insists on Force-training them before they can walk. Meanwhile, Obi-Wan just shakes his head and drinks space tea."

3. Use a "What If?" Format to Spark Creativity

  • Reframing prompts as "What if?" questions can help make them more engaging and open-ended.
  • Example: Instead of: "Write a funny continuation where Captain Rex and the clones babysit Luke and Leia." Try: "What if the entire 501st Legion had to babysit Luke and Leia for a day, but they treated it like a high-stakes military mission? Their strategy meetings include creating 'Operation Diaper Storm,' using clone trooper formations for nap time, and having emergency evacuations when Leia gets hold of a blaster."

4. Introduce a Clear Perspective or Narrator

  • Some of the best humor comes from seeing an event through the eyes of a character with a strong personality or a unique way of looking at things.
  • Example: Instead of: "Write a story where Grogu reads his journal about a boat ride." Try: "Write a story from Grogu's journal where he describes (in broken baby Yoda language) a disastrous boat ride. Yoda, Anakin, Luke, and Leia all get seasick, Ahsoka tries to 'train' the fish, and Padmé regrets everything. Meanwhile, Grogu just wants snacks and writes about it like it's a Jedi prophecy."

5. Add an Absurd or Over-the-Top Element

  • Taking an idea to the extreme can make it even funnier.
  • Example: Instead of: "Write a story where Commander Cody has to babysit Luke and Leia." Try: "Write a story where Commander Cody has to babysit Luke and Leia, but he's so stressed that he calls in every trooper he knows for backup. Within an hour, the Skywalker Lake House is surrounded by AT-ATs, aerial support is patrolling for 'nap-time threats,' and Palpatine accidentally approves a new 'Elite Babysitting Clone Squad' after mistaking their report for a battle plan."

Encourage her to keep going with her hilarious and creative ideas! These small adjustments can make the prompts even more fun and engaging. 🚀

We read through this yesterday, and she's started telling me how she's added more detail to her prompts. I think she takes constructive feedback from the AI better than from me (just like using a timer works better than me telling her it's time to wrap up), so maybe there's some opportunity here on using a layer of indirection to keep the grumps from getting in the way of learning…

A primer on generative AI

I don't want A+ to treat generative AI as some kind of magic black box with amazing capabilities, so I've been sprinkling in some primer information here and there. I want her to understand roughly how it works, how it's not actually thinking but can still do a surprisingly good job of putting things together based on patterns derived from really large data sets in ways that are hard for humans to fully understand.

I also explained how conversations and token limits work. She's already getting the hang of editing prompts to refine things instead of adding more prompts to the conversation, although she still prefers to keep most of her story prompts in one conversation because the stories sometimes refer to previous incidents in the timeline.

Text from sketch

Generative artificial intelligence

How it works:

  • Tons of data: webpages, books, questions & answers, even images & videos
  • Computer model that predicts the next word/etc.
    • noticing the context
    • bat: ball, fly, base
    • bat: cave, wing, guano, fly
    • bat: man
  • Repeat with training until it gets things mostly right
  • We finish each other's sentences/sandwiches

Result: tools that can predict words or fill in blanks or even make images, recordings, and videos of things that don't exist.

They don't actually think for themselves yet; although sometimes the results can be quite interesting

Things to remember:

  • It doesn't actually know or think things. Not everything it says is true. Double-check when needed.
  • It usually doesn't cite or credit its sources. Even when it seems to do so, it can be wrong. So double-checking can be hard.
  • Use it to help you learn & explore. Don't let it substitute for your thinking & learning.
  • Don't put sensitive/private info in.

Caveats: The models cost a lot of energy to create. They cost less energy to use, but still a lot in terms of carbon emissions, water, etc. The data they were trained on includes things that people didn't give them permission to use. They are changing jobs & industries, but are often overhyped. Everyone's still figuring things out.

prompt, response context, tokens

sachachua.com/2025-02-27-01

Other resources:

I also showed her what NotebookLM could do with audio podcast generation, so she could get a sense of computer-generated audio. She noticed the interactive mode, so we experimented with that for a bit. The pauses in her speech tend to trigger premature answers, so it works better if she thinks about her sentence and says it confidently.

Going forward

A+ finds generating text very engaging at the moment and I think she's learning a lot through experiments. She'll probably have a deeper understanding of and appreciation for fiction than I did as a kid because she can easily change some things and see how it feels. (What if this story is told in third-person perspective? What if this story is told in present tense or past tense? What if this event happens differently; what would happen because of that change?)

With any luck, exposure to lots of story elements, vivid words, and dialogue will influence how she writes. Maybe she'll eventually get to the point where she can imagine a story and then want to write parts of it or all of it herself to bring it closer to her vision. So it's probably worth supporting this and seeing where it can go.

View org source for this post

Working with smaller chunks of thoughts; adding anchors to paragraphs in Org Mode HTML export

Posted: - Modified: | org, js

I write my blog posts in Org Mode and export them to Eleventy with ox-11ty, which is derived from the ox-html backend.

Sometimes I want to link to something in a different blog post. This lets me build on thoughts that are part of a post instead of being a whole post on their own.

If I haven't added an anchor to the blog post yet, I can add one so that I can link to that section. For really old posts where I don't have an Org source file, I can edit the HTML file directly and add an id="some-id" so that I can link to it with /url/to/post#some-id. Most of my new posts have Org source, though. I have a my-blog-edit-org function and a my-blog-edit-html function in my Emacs configuration to make it easier to jump to the Org file or HTML for a blog post.

If the section has a heading, then it's easy to make that linkable with a custom name. I can use org-set-property to set the CUSTOM_ID property to the anchor name. For example, this voice access section has a heading that has CUSTOM_ID, as you can see in the . If I don't mind having long anchor names, I can use the my-assign-custom-ids function from my config to automatically set them based on the outline path.

my-assign-custom-ids
(defun my-assign-custom-ids ()
  (interactive)
  (let ((custom-ids
         (org-map-entries (lambda () (org-entry-get (point) "CUSTOM_ID")) "CUSTOM_ID={.}")))
    (org-map-entries
     (lambda ()
       (let ((slug
              (replace-regexp-in-string
               "^-\\|-$" ""
               (replace-regexp-in-string "[^A-Za-z0-9]+" "-"
                                         (downcase (string-join (org-get-outline-path t) " "))))))
         (while (member slug custom-ids)
           (setq slug (read-string "Manually set custom ID: ")))
         (org-entry-put (point) "CUSTOM_ID" slug)))
     "-CUSTOM_ID={.}")))

Adding anchors to paragraphs

If the part that I want to link to is not a heading, I can add an ID by using the #+ATTR_HTML: :id ... directive, like this snippet from my reflection on landscapes and art:

  #+ATTR_HTML: :id interest-development
  That reminds me a little of another reflection
  I've been noodling around on interest development...

Anchor links

It might be fun to have a little margin note with 🔗 to indicate that that's a specially-linkable section, which could be handy when I want to link when mobile. It feels like that would be a left margin thing on a large screen, so it'll just have to squeeze in there with the sticky table of contents. I've been meaning to add link icons to sub-headings with IDs, anyway, so I can probably solve both with a bit of Javascript.

/* Add link icons to headings and anchored paragraphs */
function addLinkIcons() {
  document.querySelectorAll('h1[id], h2[id], h3[id], p[id]').forEach((o) => {
    const link = document.createElement('a');
    const article = o.closest('article[data-url]');
    link.href = window.location.origin + (article?.getAttribute('data-url') || window.location.pathname) + '#' + o.getAttribute('id');
    link.innerHTML = '🔗';  // link icon
    link.title = 'anchor';
    link.classList.add('anchor-icon');
    link.addEventListener('click', copyLink);
    o.prepend(link);
  });
}

addLinkIcons();

And some CSS:

.entry h2, .entry h3, .entry h4, .entry p, .content h2, .content h3, .content h4, .content p { position: relative }
.content a.anchor-icon:link, .entry a.anchor-icon:link { font-size: 60%; text-decoration: none !important; font-size: small; float: right }
@media only screen and (min-width: 95rem) {
   .content a.anchor-icon:link, .entry a.anchor-icon:link { display: block; position: absolute; left: -2em; top: 0.2em; float: none}
}

Text fragments

Text fragments are even more powerful, because I can link to a specific part of a paragraph. I can link to one segment with something like #::text=text+to+highlight~. I can specify multiple text fragments to highlight by using #::text=first+text+to+highlight&text=second+text~, and the browser will automatically scroll to the first highlighted section. I can specify a longer section by using text=textStart,textEnd. Example: #:~:text=That%20is%20the%20gap,described The text fragments documentation has more options, including using prefixes and suffixes to disambiguate matches.

Text fragment links require rel="noopener" for security, so I added JKC-Codes/eleventy-plugin-automatic-noopener to my 11ty config.

If I find myself using this a lot, it might be interesting to figure out how to make it easier, maybe with something like the Text Fragment extension for Firefox.

Update 2025-02-28: Ah, it turns out I already have some Emacs Lisp to link to currently-selected text using Spookfox. Spookfox connects Emacs to Firefox using a browser extension. Once it's properly set up and connected, it allows Emacs to evaluate things in the Firefox context.

These seem like good starting points for addressing smaller chunks of thoughts.

View org source for this post

2025-02-24 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Mastodon #emacs, Bluesky #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

Playing with sketching again

| art, drawing

After our first informal field trip to the Art Gallery of Ontario, I got my own 13" iPad Air so that I can play with digital painting beside A+. Using the same apps might make it easier for her to pick up ideas from me and for me to pick up ideas from her. We mostly draw in Procreate, and I'm starting to get the hang of its brushes and features.

It's been nice doing moments from daily life again. It's been a while since I got to play with colour this easily.

A+ and I are both interested in piano, singing, and drawing, so we're experimenting with the Simply family subscription (CAD 46.49+tax/month). A+ likes to draw in the evening as a way of postponing bedtime. I could probably find lots of free drawing tutorials like the ones that Simply Draw has, but it's nice that it's already set up with the video in a corner and it pauses at the appropriate steps, so A+ can independently do it. She's starting to see shapes and shade a bit better now, although she doesn't yet have the patience to blend things slowly. I'm developing that patience, yay me. I wish I could zoom in on the reference image, though.

Here are some drawings I made following the Simply Draw tutorials.

One of the things I like about digital drawing and painting is that I can sneak up on blending by using different opacity settings and colours instead of either accurately controlling the pressure in my hand or switching between pencil and eraser. I also love the way I can use layers to build up an image gradually, how I can erase or undo, and how I can just use whatever colour I want without having to hunt for the right colour pencils or put things away afterwards. I haven't really played around with drawing with art supplies, although the watercolour tutorials that cross my feed seem fascinating. Maybe someday.

There's a glimmer here of how this might become a relaxing thing to do, different from untangling a thought or condensing a book into a sketchnote. I'm slowly getting to the point where, when I notice I'm starting to get anxious or when I'm tempted to nag A+ about procrastination, I can tell myself that I'm going on an art/music break instead and that usually keeps me busy enough until the urge passes. I think this might be useful for our sanity, especially if A+ picks up the idea too. When I'm on a music break, she often gets inspired to kick me off the piano and do her own music lessons, so that's a win. Art is something we can do side by side, and I can always make a drawing more elaborate since A+ likes to stay at roughly the same stage as I am.

I remember enjoying art enough as a kid to have fun at a summer camp where we did things like sand art and papier mache. I think I worked on an illustration of a sparrow that made it into a book of poetry or something like that. By the time we got to drafting classes in high school, I was feeling a bit more meh about art. I got back into art again with the Colors app on the Nintendo DS and then ended up getting into drawing and sketchnoting. I'd like to play around more with colour, and maybe I'll do more doodles and more drawing just because. I like drawing nature, and I'd like to get better at drawing characters too. I'll put the sketches on my blog and in my online sketches, and it'll fun to see how I grow over time.

View org source for this post