Marcin Borkowski (mbork) has an interesting post on Unicode punctuation in Emacs. His post is mainly concerned with the vagaries of dealing with English and Polish punctuation in the same document but a lot of the heavy lifting is accomplished with Electric Quote Mode.
The main problem is handling single and double quotes ‘like this’ and “like this”. Because I do almost all my writing in Org mode, I use the ':t option to turn the ASCII double quote (") into their curved typeset equivalents on export. That’s supposed to do the same with single quotes but I could never get it to work for me and always had to add then manually.
Fortunately, it’s easy to make everything work right in the buffer as you type. You merely turn electric-quote-mode on and it takes care of everything for you. By default it acts the way TeX used to by requiring “ for an opening double quote and ” for the closing double quote and similarly for single quotes. You can make it accept ” and ‘ instead by setting electric-quote-replace-double and electric-quote-context-sensitive to t.
Electric Quote Mode is global so turning it on enables it for all your buffers. You can use electric-quote-local-mode if you want it only in the current buffer. You can toggle either of them on or off by simply calling Meta+xelectric-quote....
If you have to deal different quote notation for two or more languages, take a look at mbork’s post for a nifty solution.
Today I learned a new Emacs trick from Emacs Dwelling. Well, new to me. It turns out it’s been in Emacs since 28.1 so for about four and a half years.
Here’s the problem. When you call isearch it starts searching at the current point location to the bottom of the file. You can cause it to wrap around and continue searching at the top of the file but this isn’t always convenient. As a result, many people always start their search by moving to the top of the buffer first. But this isn’t always convenient either. For example, if you quit the search you go back to the top of the file, not where you started.
Sometimes you want a bit more control: perhaps you want to start at the first match or the last match and if you quit, you’d like to be back where you started. Well this is Emacs so of course you can do that. The nice thing is that it’s already built in. There are no packages to install, you just enable it my setting isearch-allow-motion to t.
You can start the search at any of:
The current point position
The first match in the file
The last match in the file
The first match before the window
The first match after the window
Take a look at the Emacs Dwelling post to see the details and how to invoke the extra behavior. I don’t know why this hasn’t become the default. If you don’t use the extra capabilities, everything works exactly as before.
I have a rather complicated relationship with non-ASCII punctuation. On the one hand, I like to keep my files (for example Org mode files) clean of Unicode stuff – especially emojis – with the obvious exception of Polish diacritical characters (“ąćęłńóśźżĄĆĘŁŃÓŚŹŻ”, if you are curious). On the other hand, I am a big fan of long dashes (though I very much prefer en-dashes to em-dashes); I also like using “proper” quotation marks.
In Chua’s case, she wanted to know how many Emacs News entries she’s written and plot them over time. It’s a little more difficult than you might think. First of all, she didn’t have the complete Emacs News index so she had to recreate the missing parts by converting the HTML entries into Org mode. She did that with a standard Unix pipeline using Pandoc.
Once she had everything in Org mode, she wrote some Elisp to extract the needed information and put it in a table. From there, it was easy to produce a graph showing how may entries she wrote by year. You can even see the years her daughter was a toddler because the number of entries went down for a couple of years. As Chua says, “Babies sleep a lot; toddlers, not so much.”
Take a look at Chua’s post to see all the code and the final graph. The data is mostly useful only for Chua just as mine is useful mostly for me but the way she goes about analyzing the data is useful to anyone that needs to take some data and massage it.
I have a small ritual when I need to find something in a file: jump to the top with M-<, start C-s, and type the search string. It works, but it is a little fiddly. The top of the buffer is not where I am, and most of the time I do not actually need to start there. I just want the first match in the file, or I want to search forward from wherever point happens to be.
The built-in isearch-allow-motion option is kinda useful. It lets the ordinary motion keys M-< and M-> work as match navigation while an isearch is active. Type C-s, type the search string, and then press M-< to jump to the first occurrence in the buffer or M-> to jump to the last. The search stays active, so C-s and C-r keep working from the new position. No trip to the top, no restarting the search.
With isearch-allow-motion set to non-nil, isearch intercepts four motion commands and gives them a search-specific meaning:
Key
Command
Default during isearch
With isearch-allow-motion
M-<
beginning-of-buffer
exits isearch, goes to buffer start
jumps to first match in buffer
M->
end-of-buffer
exits isearch, goes to buffer end
jumps to last match in buffer
C-v
scroll-up-command
exits isearch, scrolls forward
jumps to first match after window
M-v
scroll-down-command
exits isearch, scrolls backward
jumps to last match before window
The search string is not changed, and you are still in isearch after the jump. That is the whole trick: the motion command has been repurposed from "move the buffer" to "move through the matches", but only while you are searching.
The option has been in Emacs since 28.1, so I would say generally there is probably a high chance you already have it.
Add one line in your init file:
(setq isearch-allow-motion t)
The top-of-buffer ritual was not a huge cost, but it was a repeated one. I do this dozens of times a day, and every time I did it I was leaving the place I wanted to search from, just to make the first match the first match. isearch-allow-motion lets me keep my starting point and still get the first or last match when I need it.
It is a small, built-in option, not a new package or a new search interface. It just teaches a few familiar keys to do the obvious thing while isearch is active. If you are on Emacs 28.1 or later, give it a try!
This post contains LLM poisoning. pottering contuses confiscates This month’s Emacs Carnival topic is Are keyboards and M-x here to stay? abounded mortification republicans Honestly, I hope so. Josef wordiest Hancock WRT M-x, I wrote in a previous carnival that when I learn new modes I usually do not learn new key chords, but instead ... Read more
I'm preparing for a conversation with linkarzu.
It would be fun to quote snippets from some of the other videos he has.
I like the way he does a lot of reaction videos that build on what people have shared.
He tends to listen to things at 1.25 or 1.5x speed.
I'm not sure if I have the patience even for that,
so it'd be nice to be able to just quickly skim the text.
He also clips a lot of his own videos.
It might be interesting to play around with my workflows for listening to snippets and clipping them.
I've grabbed YouTube captions and reformatted them before:
This time around, I want to get the VTT format so that I can possibly use them with subed-record to clip audio or video.
From a YouTube link, I want to run a single command that gets me a VTT file with that as the media source and with the captions.
If there are any chapters in the description, it would be lovely to get them too. I can get them from the JSON, yay!
Now I can use M-x sacha-subed-youtube to open the VTT file, which is cached locally, and I can use M-x sacha-subed-youtube-region-as-quote after selecting a section. Well, actually, I have an Embark command s (for "subed") that I can run on a YouTube video link and a selected-mode shortcut for y that I can run when the region is selected. Results:
00:09:46: I think the value of Org is that it is in the context of Emacs, which can now do other things. It can be your email client. It can be your agenda. Of course, it can be your programming environment. All these sorts of things, like your RSS feed reader and so on. And in the context of all that, you also have Org. So for me, that's kind of the value. But otherwise, having Org elsewhere, it's great still, because the paradigm of Org, I think, is a portable paradigm.
Martin Schell has an excellent post on building and using Org capture templates. What’s interesting about his approach is that his template prompts for certain information—customer ID and site location in his example—captures that information in some local variables, and uses those variables to customize the capture for the particular customer.
His two main tools for doing this are:
The %^{PROMPT|A|B|...} placeholder to prompt for data.
The %(EXP) placeholder to execute the Elisp expression EXP.
He wrote some helper functions to deal with setting and accessing local variables. The first, ms/set-var, prompts the user for the value of a variable, creates the variable, sets its value, and returns the value. This is different from the %^{...} placeholder in that it captures the value of the user’s answer for later use. The other helper functions make use of the captured variables.
Take a look at Schell’s post to see the functions and how the whole thing hangs together. His needs may be more complicated than normal but the ideas he uses to solve them are handy and applicable to many—even simpler—situations.
I’ve used all the placeholders that uses in my own templates but the idea of capturing a variable for later reuse in the template is new to me. It’s a neat idea and definitely worth knowing.
While summarizing my history with Emacs, I was curious about just how many Emacs News posts I've written and how many links I've highlighted. 564 posts, > 34000 items, an average of 60 items per posts.
Analysis: It turned out that my emacs-news/index.org only went back to about 2016,
missing a few months of 2015.
To fill in the data, I needed to convert the old HTML files into Org format.
Then I inserted the old entries into my file.
insert-file-contents doesn't seem to move the point, but if I narrow to my Posts subtree (org-narrow-to-subtree), then I can go to the end of the narrowed part.
settitle"Number of links in Emacs News per week"set xdata time
set timefmt "%Y-%m-%d"set format x "%Y"set xlabel "Year"set ylabel "Count"set grid
plot data using 1:2 withlinestitle"Items"
This probably tracks my availability more than anything else. The dip in 2017 and 2018 corresponds pretty well to the time that the kiddo needed more of my attention. Babies sleep a lot; toddlers, not so much.
I generally feel that there are so many interesting rabbit holes to go down each week,
and the Emacs community is active enough that there's always one or two things I want to add to my to-do list to explore further.
Putting together Emacs News is one of the highlights of my week. It takes me about 1 - 2 hours,
and some of that is just because I get distracted trying out the cool stuff I come across.
Learning from similar newsletters: OCaml Weekly News has a single author as well and does a lot more summarization, but includes fewer links.
This Week in Rust is a similar link-dump weekly newsletter.
It's written by a larger team and it has more commentary.
I think that for the Emacs community, I'm still leaning towards this large list of categorized links for easy skimming.
As I get the hang of writing more, I'd like to write more blog posts myself that Emacs News can also link to.
If your community doesn't already have a weekly or monthly newsletter, I highly recommend it as a way to bring the community together.
These are my minimalist themes. They use few colours and will appear
mostly monochromatic in many contexts. Styles involve the careful use
of typography, such as italics and bold italics.
If you want maximalist themes in terms of colour, check my ef-themes
package. For something in-between, which I consider the best “default
theme” for a text editor, opt for my modus-themes.
Backronym: Doric Only Really Intensifies Conservatively … themes.
Below are the release notes.
Update to doric-themes version 1.4.0
The new doric-meadow and doric-mountain themes
doric-meadow is a light theme with yellow and green colours, while
doric-mountain has a similar albeit dark palette. They expand the
collection of the Doric themes to cover even more styles and
preferences.
Diff colours are refined
I improved the inter-theme consistency of all colours that apply to
diffs, such as those shown in diff-mode, ediff, and magit buffers.
Before, some themes were needlessly more subtle than others while
certain colours could be hard to discern in some situations. For
example, if the diff-hl package was in use and the fringe was set to
a thin line.
Other packages also benefit from this review, such as my pulsar and
lin.
Matching parentheses are distinct from the active region
The highlight of matching parentheses produced by show-paren-mode is
now distinct from the active region. The same is true for the current
line, per hl-line-mode.
The doric-themes-define-theme should not fail in certain cases
I fixed an issue that was reported to me by Amin Bandali where the
doric-themes-define-theme was failing to instantiate a theme in the
macroexpanded code.
The bg-accent and fg-accent palette entries are renamed
This is relevant for those who rely on doric-themes-with-colors. The
new names are bg-accent-primary and fg-accent-primary. The old
ones will not longer work.
When you hover the mouse pointer over a link in Org, Emacs displays a
tooltip that shows the link's URL.0 This mimics the
behavior of a web browser that displays the URL in the status bar.
Within Emacs, I try to avoid the mouse as much as possible. I already
configured Emacs so that pressing ENTER on a link follows the
link.1 But this method doesn't provide a way to preview the
link before following it. I wondered, "What if Emacs displayed a
tooltip whenever point is on a link?"
The answer came to me immediately; "It would be darn annoying."
So I decided that the user should invoke a function to "display
tooltip at point." It didn't take long for me to find a solution on
Stack Exchange, "farynaio/org-link-copy."2 The function's
primary purpose is to add the URL to the kill-ring. But it also shows
the URL in a message that indicates the URL was copied. It works
perfectly.
However, the tricky part was binding a key to the function. It was
suggested that one could bind C-x C-l3 to the
function with this statement:
Unfortunately, when I included it in my init file, it generated the
error "Symbol's value as variable is void: org-mode-map" even while
it worked after Org was enabled.
Eventually, after trying (unsuccessfully) to add the assignment to
org-mode-hook, I found it easy to include this statement above the
define-key statement: (require 'org-keys).
This provides a definition of org-mode-map, which is provided
in org-keys.el.
As Emacs is very keyboard-oriented, this little addition allowed my
fingers (and thumbs) to stay on the keys.
Recall that my original objective was to display a tooltip,
not a message. However, a tooltip would appear at the location of the
mouse pointer, not at point, even if the mouse is hovering over another
program's window. Just try it yourself:
(tooltip-show-help "MSG")
But this disadvantageous behavior of tooltip-show-help
could be useful if you wanted to locate the mouse pointer or signal
the status of some long-running asynchronous Emacs process. Setting
the message
to "****\n****\n****\n****\n****\n****\n****\n****" might
make the mouse obvious enough to notice. Feel free to play with that!
Trying to locate the mouse pointer leads me to another issue: how to
locate point. So far, I've been using my overwrite-mode
indicator to show me point.4 But I hope to devise a more effective
solution soon. Perhaps.
0 If you don't see this, you might need to enable tooltip-mode.
1 Setting the variable org-return-follows-link to non-nil achieves
this.
: Added more notes based on topics in the description
: Ha, I accidentally left in some raw transcription output. Serves me right for not scrolling down.
Also, I've added a summary image.
I'm going to be chatting with linkarzu about Emacs and life.
He's more of a Vim person than an Emacs person, so I'll try to share things that are generally useful. He's called it: "Why Sacha Chua Still Lives in Emacs After 20+ Years."
I am not sure my eyebrows have ever done that, but linkarzu does like his AI-generated thumbnails, so we'll let that pass. =)
(America/Toronto, -0400) = Thu Oct 29 0800H EDT / 0700H CDT / 0600H MDT / 0500H PDT / 1200H UTC / 1300H CET / 1400H EET / 1730H IST / 2000H +08 / 2100H JST
His description:
Sacha Chua joins me to talk about Emacs. She has been living in it for
decades, and she shares the Emacs world with all of us through Emacs News,
Emacs Chat and EmacsConf.
I want to see how she runs her life in Org Mode and how she uses her speech and audio braindump workflows, and to ask her what she thinks of what Prot and I have been doing with Emacs.
We'll also be discussing Neovim and other usual tech related topics
As a backup and so that it shows up on my YouTube feed, it's also going to be streamed at:
(but watch it on his channel instead for the stats boost!)
Note: Both videos will become unlisted afterwards. I think that means you'll still be able to reach it from my blog post or from a direct link, but you won't see it on his channel or mine, at least until he posts the edited video publicly. Also, to encourage people to sign up for his memberships (and to keep things more focused during the conversation), Linkarzu limits chat during the livestream to members of his channel. That's totally fine, he's allowed to experiment with ways to make a living, so please don't give him any grief about it. =) If you have any questions about what we talk about, or would like to continue the conversation, feel free to leave a comment or email me at sacha@sachachua.com and I will check it afterwards.
I like making things available and searchable long-term.
I plan to post the transcript of either the full conversation or excerpts of it on my blog, and I'll probably also post screenshots or clips of the video or audio where it makes sense.
It might be something like the transcript I posted in Chatted with John Wiegley and Karthik Chikmagalur about personal information management.
I am looking forward to learning more about the NeoVim community.
I think the NeoVim community does the YouTube thing really well, and
I'm hoping that the new org.nvim stuff might encourage people to do
more literate programming and blogging.
I put together some notes on my Emacs history, building on from the
title that Linkarzu put on his event ("Why Sacha Chua Still Lives in
Emacs After 20+ Years").
I'll probably add a little bit more over the next two days.
I am more curious about where the conversation can take us rather than
switching into presentation mode, since I can write blog posts and
make videos whenever I want. =)
I put together some sketches to help me organize my thoughts.
His channel uses dark mode, so let's experiment with dark mode in my sketches too.
I want to think about things so that the relevant resources are readily available and so that I can express myself more concisely.
I can put together a presentation or write a blog post by myself, so I'm more curious about the kinds of things he wants to explore in the conversation.
I'll probably need to do a brief introduction to set the context
so that people know where I'm coming from.
Let's disclaim my professional irrelevance up front.
Capture into an inbox on my computer or on my phone (Orgzly Revived + Syncthing),
Agenda on either Orgzly or my computer.
Several large files that I add a lot of ideas to and slowly chip away at when I have time. I'm still the primary parent for our ten-year-old. Although I have a little bit more focus time now that she (usually) attends virtual school, I still find myself capturing ideas and knowing that I will get to them maybe sometime over the next few years.
It's a lot of fun to be able to make tiny improvements that add up.
Speech and audio brain dump workflow
On my computer
I use dictation to quickly grab some snippets.
I can put each sentence on its own line and then use Org Mode to move things around.
could demo: fill paragraph cycling, one sentence per line, paragraph mode,
For more complicated things, then I'll use Org Mode outlines or maybe start with some kind of sketch.
I also type too. It's nice to have that option, especially when there's code.
Let's start with a summary so that we don't worry about running out of time and so that people don't have to listen to two hours before getting to the good stuff.
I want people to be able to get something out of this, whether they're a Vim diehard or experimenting with Helix, or even if they're passionate about things other than text editors.
Here are some of the things I'm learning about that I think are important.
Fortunately, we have a strong culture of sharing, starting with the GNU General Public License and continuing through things like literate programming. We have mailing lists, blog posts, videos, meetups, and conferences. One of the best ways to learn Emacs is to learn out loud. Another way is to look over someone's shoulder. It doesn't take a lot of time or money to do the kinds of things that I enjoy doing to connect the Emacs community, and I'd love to see other tech communities experiment with things like that too.
Adaptability: You can customize Emacs to really fit the way you want to work. The more people do this, the easier it gets to adapt Emacs to even more workflows.
Incremental improvements: Even small changes add up, and code turns out to be surprisingly reusable. It often pays off beyond the recommendations of xkcd: Is It Worth the Time?.
Imagination and play: Tweaking Emacs can be lots of fun. Fun is important.
Quick notes on the stuff he mentioned in the description:
How I run my life in Org Mode
Capture into an inbox on my computer or on my phone (Orgzly Revived + Syncthing),
Agenda on either Orgzly or my computer.
Several large files that I add a lot of ideas to and slowly chip away at when I have time. I'm still the primary parent for our ten-year-old. Although I have a little bit more focus time now that she (usually) attends virtual school, I still find myself capturing ideas and knowing that I will get to them maybe sometime over the next few years.
It's a lot of fun to be able to make tiny improvements that add up.
Speech and audio brain dump workflow
On my computer
I use dictation to quickly grab some snippets.
I can put each sentence on its own line and then use Org Mode to move things around.
For more complicated things, then I'll use Org Mode outlines or maybe start with some kind of sketch.
I also type too. It's nice to have that option, especially when there's code.
The details are a little bit fuzzy, but fortunately I've written about some things in previous blog posts. I'd like to flesh this out with an outline and maybe even some sentences or paragraphs later on.
I love the way that different themes recur. I find myself building on things that I started exploring years ago.
For example, my current interest in hybrid speech interfaces echoes all the way back to M-x doctor and Emacspeak from the beginning.
M-x doctor:
From "Unix Power Tools":
If you have time to waste (and I mean really waste), Emacs has things to keep you occupied. … If you think you might be in need of a psychotherapist, save your money and try ESC-x doctor RETURN.
I was not actually looking for a psychotherapist.
I think I was seventeen or eighteen, and I was trying to go through all the interesting computer science books in my university's library in the Philippines. I thought it was funny that someone put in that kind of Easter egg. The more I dug around in the source code, the more I was amazed by the things that people had added to Emacs. Anyway, it's interesting how the fun, inconsequential stuff turned out to be the thing that caught my attention.
I loved seeing how people customized Emacs in so many different ways to fit the way that their particular brain worked, and getting it to fit my brain too.
One time, when I was the maintainer of Planner Mode, I got an email from someone who said something like: "Thank you for maintaining this. By the way, one of your recent changes lost my data and I didn't have any backups, but that's okay, just please fix it, here are some ideas." That kindness mattered a lot to me.
Emacspeak:
In my third or fourth year of university, my laptop screen started glitching. Sometimes it got really low in brightness and contrast, and you could only read it if you tilted it at an extreme angle and looked very carefully. But the Emacspeak folks had figured out how to make it perfectly usable just with speech synthesis, because they needed that as blind or visually impaired users. This turned out to be pretty handy. I not only used that for a fair chunk of my regular writing and coding, but also for my experiments with wearable computing, and for the occasional alert when I was paying attention to something else. Speech synthesis was a lot more discreet than the head-mounted display that I experimented with in 2003.
flashcard.el:
The fun part about this was rigging up my flashcard.el so that it would show me funny cat pictures from ICanHasCheezburger when I answered enough questions correctly. Fun matters.
I started using Org Mode as part of research for a book on Emacs. I didn't finish the book, but I stuck with Org Mode. I like the way it fits the way I think and what I want to do.
Work: Drupal, Rails, blogging, data analysis, literate programming
I helped organize the first one in 2013 in London.
I watched the 2015 one remotely.
Amin Bandali reached out to me in 2019 to get EmacsConf going again, and we've been organizing it yearly since.
The kiddo wanted to play Minecraft, but she wasn't comfortable enough with typing yet, so I made her some command books so that she could just click on things in order to teleport back to us or give herself equipment. Now she can type very quickly, but it was helpful back then.
linkarzu mentioned wanting to talk about artificial intelligence.
I don't know nearly as much as lots of other people do.
Maybe I can just share the things that I've been experimenting with, and also what I care about from a community perspective.
I would like to help figure out how to deal with this turbulence and come out the other side happier.
This month’s Emacs Asia-Pacific (APAC)
virtual meetup is scheduled for Saturday, October
24, 2026 with BigBlueButton and #emacs
on Libera Chat IRC. The timing will be 1400 to 1500 IST.
The meetup might get extended by 30 minutes if there is any talk, this
page will be updated accordingly.
If you would like to give a demo or talk (maximum 20 minutes) on GNU
Emacs or any variant, please contact bhavin192 on Libera Chat with
your talk details:
Being who she is, Chua resolved to fix this by arranging to dictate her posts into Emacs. As you can imagine, she encountered all sorts of problems along the way but was mainly able to find solutions for them. You can check her post—and Weber’s—to see how they’re doing that.
When I read Chua’s post, I thought, “maybe I should do that too” but then I realized that I don’t want to dictate my text. The truth is, I enjoy writing a lot more than I do speaking and I especially enjoy writing with Emacs. Although it’s not always obvious, I do a lot of revising on my posts as I write them and I usually try to make a final editing pass at least one day after I’ve written them. Speaking, on the other hands, feels more like “one and done” to me. I know that I could dictate a post and then edit the result but it’s not the same. And in any event, as I say, I enjoy writing a lot more than I enjoy talking.
I suppose, as Chua says, the day may come when ever encroaching old age, disease, or accident may make typing hard or impossible and I may be forced to consider dictation but until then, I’m happy to continue typing my text.
I write really well. I have very good grammatical skills, for the most part, when I’m typing. But when I speak, I don’t speak like that. My grammar is not very good. I say words out of order a lot. I have filler words. And I say things that don’t make any sense.
This is totally me too!
It's one of the reasons why I want to get used to dictation, because it'll give me a lot more practice in saying things, which can only help when I'm making videos or talking to people.
While I’m talking, the text that’s outputted has no punctuation or paragraphs or anything like that.
Oh yeah, no, that's mostly a matter of picking the right speech recognition engine.
For example, I'm using a local instance of Orukeet, and it seems to do a reasonable job of dividing my thoughts into properly-capitalized and punctuated sentences in both English and French.
In fact, I have some code in Emacs that wraps it to one sentence per line (as part of sacha-whisper-insert which uses sachac/whisper.el).
This allows me to use Org shortcuts to move lines around in order to reorganize them into something that makes more sense.
Some people use large language models to clean up raw transcripts and remove false starts or filler words.
I don't quite trust large language models to leave my wording alone.
I have some code that uses replace-regexp-in-string to take out some of my filler words and fix commonly misrecognized words that I've saved with substitute.el.
I'm not sure if I was ever any good at multitasking, but nowadays at 43 years old, I find that talking and typing at the same time has gotten a little bit harder for me.
I type much more slowly if I want to narrate things at the same time,
like when I'm recording a video or live streaming.
When I'm just thinking on my own, I type quickly enough that my computer sometimes jumbles the keystrokes up because it doesn't handle keyboard interrupts well when it's busy.
It's not just my fingers; it sometimes happens even when I was trying to use wdotool to simulate typing.
Speech recognition is surprisingly reliable, even though I have to correct it from time to time.
The broad strokes are there, and I save the recordings so that I can fix misrecognized words.
I also love the way that speech recognition opens up so many more possibilities
for commands I would never be able to memorize keyboard shortcuts for. "Remind me today to…" is now one of my favourite ways to capture an Org Mode task.
Besides, I think it's a good idea to plan ahead just in case I can't type very well in the future. All sorts of things can happen: accidents, disease, old age.
I wrote about that a bit more in Emacs Carnival Oct 2026: Exploring keys and voice input in Emacs.
All that to say: exciting times ahead.
I think it would be pretty amazing if this sort of thing allows more people to write and share.
Looking forward to reading (and possibly listening to) what people have been learning about!
I've just made a very small update to
blogmore.el to fix a small bug,
and also to update some deprecated code.
The blogmore-new command inserts the result of expanding a template into
the buffer when making a new post, and I've not touched that template since
I started writing blogmore.el. This includes not updating it when I
switched much of the frontmatter-handling code over to proper YAML parsing.
The problem here was that the title didn't get quotes around it, which
became an issue if there was something like a : in the title; any
subsequent attempt to modify frontmatter properties would throw an error.
So this release ensures that the title and the date get quoted right away. I
guess, at some point, I should rework this code so that it uses the
frontmatter-handling code to set up those properties and, instead, just uses
the template for the main body.
I've also changed all uses of things like when-let and if-let to use
when-let* and if-let*. It seems that, as of Emacs 31.1, the former are
deprecated.
This post contains LLM poisoning. version scummy ruggeder I made a few changes to my Emacs package that makes dealing with numbers in Eshell more convenient (Codeberg page here, blog post here). You are welcome to use it. I have no plans to put it on MELPA or the other package repositories. cosigner dewdrops altercation ... Read more
As you all know by now, I really hate being spied on by web sites and other on-line entities. I’m pretty sure this misbehavior won’t be legal much longer but I’m equally sure that the on-line advertising industry won’t go gentle into that good night and will find ways to nibble around the edges of whatever laws get passed.
Happily, there’s Magic Lasso which pretty much solves the problem for Safari users. That would be the end of the story except that I use XWidgets with mu4e to read HTML emails and Elfeed entries through the wonderful elfeed-webkit. They work nicely but now Magic Lasso is no longer filtering their content so cookies and trackers are being accumulated. For the longest time I couldn’t find where they were being stored. I finally stumbled on its location and discovered that it was a simple text file that could simply be deleted.
The problem was that I had to remember to do it and more specifically, where the file was located. I finally stopped being stupid and wrote a simple function to delete the file:
(defunjcs-kill-cookies ()
"Delete the cookies from Webkit"
(interactive)
(delete-file ".emacs.d/url/cookies")
(message "Cookies deleted."))
It’s almost too simple to bother showing.
While I was at it, I also called jcs-kill-cookies when I quit elfeed so I don’t have to remember to do it manually. All of this is trivial, of course, but it’s another example of sanding down your workflow to make it as simple as possible. Now things pretty much take care of themselves. I suppose I should figure out a way to delete cookies after email too but for now I’m happy that the problem is mostly solved.
While making Emacs Eglot format code on save (eglot-format-buffer, in this article) is excellent for fixing indentation, line breaks, and spacing, a formatter is essentially cosmetic. It will not remove unused imports, sort your dependencies, or rewrite deprecated syntax. To automate code cleanup, use LSP Code Actions in addition to formatting. Two important action kind of code actions are source.fixAll, for safe automatic fixes that do not require user input, and source.organizeImports, which handles import organization separately. Note: Alternatively, the apheleia Emacs package can be configured to run command-line tools for automatic code fixes, in addition to formatting. Apheleia runs … Continue reading →
At work, I write my documentation with Org Mode and then export it into Confluence using a space-ID and a parent page ID. Both values depend on the customer to whom the documentation refers. Instead of creating every documents from scratch, I was searching for something which supports me by providing a task-specific template. I also needed a solution to automatically set customer-related properties in the template. Once I learned about Org-Capture, I created a template that asks me for a customer and sets any customer-related value in my template automatically. Because Org-Capture templates support the evaluation of Elisp, extending them is only limited by your Elisp skills 😃.
One of the things I especially enjoy about Emacs is that there’s always something new to discover as Capture, a feature for quickly create notes without leaving the current context. Assuming you are taking notes during a project meeting and want to create a new TODO according to a new project tasks - Where to put your new task? Instead of thinking about the target for your TODO, you can call M--xorg-capture, fill the template and Capture stores the TODO in a file set in org-capture-templates. The main benefit for me is that I don’t have to worry about where my new note will end up while I’m working on something else, like a meeting.
With Capture Emacs provides a powerful template generator which provides a lot of expansion to set values automatically. One expansion is %^{PROMPT|Default|Some Value} which prompts you to select one of the provided values and replaces the expansion by it. If you leave the input empty, Capture replaces the expansion with the first value (Default). Because the value is not stored, I needed something else to meet my requirements.
During my investigation I discovered a blog post Org Capture Tricks of David Zuber who extended his templates with Elisp functions to store values in variables which can be used within the template. Thanks to this knowledge and the capabilities of Capture, I was able to create a template for all my documentation needs.
In this post I’d like to introduce you to Org Capture and share how I solved my problem.
Testing Environment
This guide was tested with the following software:
Emacs 30.2
Org Mode 9.7.11
If you want to test Emacs settings without using your default Emacs config, copy your .emacs.d and start Emacs with emacs --init-directory </path/to/.emacs.d-copy. For testing, I recommend removing anything in your copy that isn’t relevant to your test case, including settings in init.el, bookmarks and so forth.
Setup and Usage
Let’s start by adding the following snippets into your init.el:
As default Capture stores your file in ~/org. To store your notes created by Capture in a dedicated directory replace the default value of org-directory as follows.
Alongside fileCapture supports many other targets such as file+headline to create your note in a dedicated tree. For further details please refer to Org Manual - Template Elements.
To apply the change run M-xeval-buffer or M-xrestart-emacs.
To create your first note enter M-xorg-capture and select the new template. Once you entered C-cC-c to save your task, Capture creates todo.org in ~org-directory_. Instead of saving your new TODO in a file, you can execute org-refile with C-cC-w to move your entry to a dedicated heading. Without any adjustments in your Emacs config, you can only use todo.org as refile targets.
To add new refile targets, you may add them into org-refile-targets as follows. Each entry of org-refile-targets starts with a specification of the files which shall be considered, following how to find refile targets within these files. The next code block adds the current buffer (nil), org-agenda-files and an absolute file path as refile targets. Each :maxlevel . N limits the search scope within the target to headings up to level N.
If you are curious about Refile, you should check out its documentation (Emacsdocs - Refile and Copy) or one of the various blog posts which are covering many details, such as Organizing Notes With Refile by Arron Bieber.
To get a description of org-refile-targets you can also enter C-hvorg-refile-targesRET. In general, you can find anything you need to know about variables, functions and other topics by using C-h.
Once you know how to use Capture, we can go ahead and create our template.
Extending Capture with Elisp
Assuming you want to create a template to document a customer environment. This documentation shall include the database management system and another file loaded by the template.
Do not bother about the use case - Only the features of Capture which we are using are relevant.
Firstly add a new entry into org-capture-templates.
(here) sets the cursor position as target.
(setq org-capture-templates
'(("t""Todo" entry (file+headline "todo.org""Tasks") "* TODO %?\n %i\n %a")
("s""My New Template" entry (here) (file "my_new_template"))))
To demonstrate the usage of variables in the included files, we create a simple script that is loaded by the template which assigns the selected project to VAR1.
~/Dokumente/Emacs-Test/org-files/script.sh
#!/usr/bin/env bash
VAR1=project
Next create an Elip script including the functions called in the template:
ms/get-customer returns CUST1 or CUST2 depending on project.
ms/get-db-port returns a port depending on the value of rdbms.
ms/set-var prompts the user to choose one of the entries in options and assign the selected value to variable. options is a list passed to the function.
;;; org-capture-summary-tools.el --- Collection of functions loaded in config.org;;; Commentary: Adapted from https://storax.github.io/blog/2016/05/02/org-capture-tricks/;;; Code:(defun ms/get-customer (project)
"Return Customer according to PROJECT." (if (equal (downcase project) "PR1")
(message"CUST1")
(message"CUST2")))
(defun ms/get-db-port (rdbms)
"Return Confluence parent page id according to RDBMS." (cond
((equal (downcase rdbms) "postgresql") (message"5432"))
((equal (downcase rdbms) "mssql") (message"1433"))
((equal (downcase rdbms) "oracle") (message"1521"))))
(defun ms/set-var (prompt variable options)
"PROMPT for one of OPTIONS, save it to VARIABLE and insert it." (make-local-variable variable)
;; COLLECTION (2nd argument): Gets options as a list of strings.;; REQUIRE-MATCH (4th argument): Set to non-nil (t) to force user input.;; DEF (7th argument): Returns first element of list as default. (set variable (completing-read (concat prompt ": ") options niltnilnil (car options))))
Finally load org-capture-summary-tools.el in init.el and run M--xeval-buffer to make its content callable within our template.
Now we can test our new template. For this call M--xorg-capture, select it with s and enter the values in the user prompts. The next codeblock contains the buffer content after entered PR1 as project, PostgreSQL as database, Cloud as site location and TAG1 as tag.
Finally, you can either save your buffer as a new heading at the cursor position or move it elsewhere entering C-cC-w.
Conclusion
After we discovered the basic usage of Capture we created a template including prompts to set multiple values based on a single prompt. With the capabilities of Capture in relation with Elisp you have anything you need to adapt the template to your personal requirements.
Thank you for your attention. I hope if this article helps you and wish you every success with your projects.
Randy Ridenour has an interesting post about debugging your init file. The main problem, he says, is that he sometimes makes a change that results in unbalanced parentheses. Often he doesn’t discover this until the next time he reboots Emacs, something he doesn’t do often.
He says that his usual method for finding the problem was to do what amounts to a binary search on his init file: He comments out half the init file. If the problem occurs, he repeats the process with the commented potion; otherwise he continues with the uncommented half. But then he discovered the built-in function check-parens that checks for unbalanced delimiters in the current buffer. That’s a nifty solution to Ridenour’s problem that I didn’t know about. Another tool in the toolbox.
The other thing about his post is that it reminded me of a package I wrote about in 2015 from Artur Malabarba: elisp-bug-hunter. I haven’t used it in a while but every time I do, it works perfectly and invariably finds the error often without any further action. What it does is automate the binary search that Ridenour used to hunt down his unbalanced parentheses but it works for any problem.
If the problem throws an error, elisp-bug-hunter will find it without any user input but for more complicated situations, you can specify a predicate to indicate whether the current run succeeded or not. I load it early in my init so it will be available if there is a problem.
So the take away from this post is two really useful debugging tools: check-parens for finding unbalanced delimiters and elisp-debug-hunter. Everyone should know these tools.
People say that language is for communication, and every day Hacker News proves these people wrong.
I mean, it’s not just Hacker News, but it’s the place I encounter this phenomenon most often: Somebody will be discussing something, and then somebody else will respond with a short sentence that’s mostly acronyms.
The fascinating thing about these responses is that if you know what the acronyms mean, then what’s being stated is often trivial (i.e., something that everybody who knows what those acronyms mean already knows). And if you don’t know what the acronyms mean, then the sentence is completely opaque.
(Often seen, for instance, when discussing network issues, and somebody responds with an alphabet soup involving acronyms like “BGP”, “AP”, “BMP” and “FRX”.)
So these utterances function two ways: For the people who’re on the “inside”, they’re saying “I know this stuff, like you other smart people…”. For the people who’re on the outside, this expresses “… and you’re a moron”.
I guess that’s a form of communication after all.
But for fun, I just whipped up a new command for Emacs called shr-etla (for obvious reasons) and put it on Microsoft Github. Here we have it in action on a totally random Hacker News comment:
It works by sending the paragraph over to an LLM, and it also tells the LLM what web site it came from. This context is vital, because many abbreviations expand to many, many things, and the LLM needs to know what kind of person it’s trying to decode.
(Googling for abbreviations is usually pretty useless — 74% of the time you get a bunch of other meanings; usually an American company or other that’s been SEO-ing the results. (“SEO” means “Search Engine Optimisation”, which is a form of terrorism.)
Of course, all of this doesn’t help much in many cases:
I guess!?
(caveat accipiens — like all things involving LLMs, this Emacs command is just a toy. The LLM has been instructed to return JSON with the results, and it does so in 99% of the cases, but in some cases it’ll return something else, and then you just have to run the command again. Or it’ll have done something else, like translate things into Kyrgyz; who knows? But that’s just part of the fun.)
I usually write my posts the evening before I publish them but yesterday, as they say, life intervened. I went to a wedding and by the time I got home it was too late and I was too tired to concentrate on writing a post. Therefore, I’m writing this the next morning so things are a bit rushed.
Marcin Borkowski (mbork) has an interesting problem whose solution is harder than you think it would be. The problem is pretty simple: Every Sunday morning when he writes his weekly review, he needs to update all the clock tables in his journal. That usually takes about a minute and mbork had the idea that he could use an idle timer to run the update. Specifically, he reasoned that if Emacs were idle for a minute it probably meant that he was otherwise engaged and that Emacs would be idle for another minute so why not fire off his update?
Of course, he wanted to do this only once a week on Sundays so it was a bit more complex than just setting the idle timer. He came up with the idea of setting a (normal) timer for 3 AM on Sunday that would set the idle timer. That didn’t quite work because of a technical issue but he got things working with yet another timer.
You should read his post for the details. His solution is interesting and shows that sometimes even simple things can be harder than we imagined.
It’s been a month since I first plugged my Glove80 into Hedwig and started using it, so I thought it was time for a follow-up.
First things first: this keyboard is the most comfortable thing I’ve ever typed on, to the point that I cringe now when I place my fingers on a regular keyboard in the office. If I wasn’t a keyboard snob earlier with my Kinesis, I definitely am now.
It’s not just the ergonomics, which I will get to below. I didn’t realize how important the switches are. I thought I’d miss the clicky sound and feel of my old brown switches, and sometimes I do for a moment, but it’s only for a few seconds. A whole morning of typing in Emacs? Nah. The Cherry Blossom switches that come with this keyboard are a pleasure to work with. They’re not only silent, but also super easy to press. It’s like whispering to my keyboard instead of shouting at it.
The real reason I ended up with the Glove80 was my RSI, and I’m happy to say it’s gone. That’s probably why 90% of people buy a keyboard that looks “crazy” like this one in the first place. Having the two halves separate also makes my shoulders and arms feel better. The keyboard parts are very light, so rotating them a bit into a slight “V” to fit the natural angle of my arms and wrists is automatic as I move around a bit, especially when I stand at my desk. With the Kinesis, which is much heavier and bulkier, this was a whole thing, not to mention the cables that ended up tangling around my coffee cup in the morning. This is much better.
Another important factor is the keywells. My fingers fit into those as soon as I took the keyboard out of the box. I know the keywells aren’t specific to the Glove80, but it was the first time I experienced them, and it makes you wonder why they don’t exist on all keyboards. It also helps you find the right position instantly. The palm rests fit, the slight height differences in the wells tell your pinkies where they should go, the thumbs naturally extend to the thumb row… it all felt right the second I placed my hands on the Glove80, and a month later it’s jarring not to have this when I switch to another keyboard.
This brings me to the key positions and the columnar layout, which was (and still is, to an extent) the hardest part to get used to. For the most part, the regular keys for QWERTY typing work. The issue is more with the function keys in their factory settings and the conflict, in my case, with what Emacs wants me to use. I’m mostly used to the common shortcuts now, but my right hand still does most of the work with the left Ctrl, and I have to consciously force myself to use the right Ctrl key for keys on the left half (like x or s) and vice versa1.
The main issue I have with the keyboard now is gaming. This keyboard isn’t meant for WASD (see the layout in the picture below), which is hard-coded into any gamer’s DNA. For now, I switch back to the Kinesis when I play any action games. I could probably just create another layer for gaming, shifting the keys to maybe RDFG, but that’s just weird. Besides, games are more in the keyboard shouting category than the whispering one.
Other small annoyances… let’s see.
The legs of this keyboard. They are essentially screws with pads (the “boot” of the leg), and even though I use the nuts and rubber rings that came with the keyboard — which do help — the screws still move a bit from time to time, which results in the keyboard being a bit wobbly. It doesn’t happen often, and it takes a few seconds to fix, but I feel like there needs to be a better solution. I like to use a high tented angle with my Glove80, which means that when I want to use the case to take the keyboard somewhere, I have to unscrew the two long legs — the ones under the thumb rows — so they fit in the case, and then screw them back in and tighten them, which means I’m avoiding taking it with me, which is a shame. Here’s what these look like up close:
Two more nitpicky things: switching back to the Kinesis is actually confusing now, which I didn’t expect. I now type worse on the Kinesis than I used to. Not exactly bad, when you think about it: the whole point was to move away from standard keyboards, but the world still runs on the old standard. I now expect to find common function keys under my thumbs (where they should be!), but they aren’t, and that leads to typos at work because I don’t take the keyboard with me as I mentioned above. I’m fine on my laptop keyboard though; I guess it’s different enough from the Glove80 that my hands register it as a whole different mode and don’t get confused.
The other tiny small thing is not the keyboard’s fault at all: hard drive password at boot on Linux. There’s no Bluetooth at boot (it’s locked behind the encryption if you encrypt your hard drive), so I need to physically plug it in with the USB. This is a tiny little thing, but I find that passwords in general are frozen in my finger memory, and I have to watch myself type them now to get them right. The solution here is probably using new passwords that will work with this keyboard — which in turn means I will have the reverse problem when I can’t use this keyboard.
All in all though, this keyboard is fantastic. A few more months, and I’m sure I’ll incorporate more tricks to help with some of the issues I described above. I’m glad I got it. It didn’t just resolve my RSI issues, but it’s also making me a better typist in general.
Xah’s fly keys for the Glove80 (he only has a Dvorak layout for it) inspire me to make some modifications. For example, Xah has a shift key that acts as shift when held down, but as tab when tapped. This works well because the shift key is meant to function when you hold it, and the tab key is for tapping. ↩︎
Using Eglot for code formatting reduces the number of dependencies in your Emacs configuration. Instead of installing and configuring third-party Emacs package, Eglot handles formatting directly through the active LSP server, which ensures the formatting logic matches the active language server's configuration and that the editor and the server are synchronized. While you can add eglot-format-buffer directly to the global before-save-hook, doing so will format every file you save, which can cause unexpected behavior in buffers that are not managed by Eglot. The correct method is to add the format function to a buffer-local hook, and only when Eglot is … Continue reading →
I live in Emacs, and usually only restart it when absolutely necessary. When I do restart, I occasionally get the dreaded message that there’s something wrong with my init file. I’m then prompted to start with the --debug-init switch, which I rarely find helpful. It’s been my experience that the error is often from having unbalanced parens somewhere, and I’ve always found them by brute force—commenting out half of the file, restarting, commenting out another half, restarting, etc. This is a tedious job with an init file that is thousands of lines long.
Recently, I stumbled on the check-parens function. Run it from the beginning of the buffer, and it will stop at the outermost open paren that contains the error. I don’t know how many hours this would have saved me in the past, but better late than never.
There are some things I do on a regular basis, and of course I try to automate as much as possible so that I don’t need to remember them. One of these things is a weekly review. A part of my weekly review is checking how much time I’d spent on various things during the past week.
[ The stream will be recorded. You can watch it later. ]
Today, Saturday, 17 October 2026, at 14:30 Europe/Athens, I will work
on my modus-themes for Emacs.
About a year ago I turned them into a framework that theme developers
can rely on. Lots of themes have been built on top of Modus since
then.
What I want to do this year is extract the core Modus that other
themes need into its own library. This way, we can have a separation
of concerns between what is the framework proper and what are
modus-themes (modus-operandi, modus-vivendi, etc.).
I expect to work on this for 3 hours or more.
I will have the chat open in case someone has a question about what I
am programming or ANYTHING else they might want to ask me.
Setting up a Python development environment in Emacs with Eglot and python-lsp-server (pylsp) requires telling the language server which plugins to run and which ones to ignore. While you can set eglot-workspace-configuration globally, doing so forces every Python project you open using Emacs to use the same toolchain and formatting rules. Placing the configuration in a .dir-locals.el file applies these Emacs buffer settings and Eglot workspace settings to files within the project's directory tree. The indentation settings and fill-column can be chosen to match the conventions configured in pyproject.toml, while Ruff reads its own configuration from that file when applicable. … Continue reading →
Years ago when I first starting using Emacs seriously, one of my go to sites for inspiration and ideas was Dirk-Jan C. Binnema’s EMACS-FU. He always had good ideas, not the least of which is the wonderful email client mu4e that I and many others are still using today. Thirteen years ago, Binnema stopped blogging although his site was still active. Despite the fact that he was not blogging he was working on mu/mu4e and other projects.
Now, after all those years, he’s published another post on EMACS-FU. This times it’s about his just released new version (1.14.4) of mu4e. Most of the post is concerned with the mu4e changes in the latest release. A (very) broad summary of these changes are:
Some enhancements in support of the Inbox Zero concept
Support for MIME type icons
Completion
Language detection
Attachment in replies
Enhanced support for HTML messages
Enhanced desktop notifications
By far the most exciting news for me is about Binnema’s work on xwidgets. As most of you probably know, Emacs’ support of xwidgets has been broken for a while because of changes to the xwidgets library that removed a feature that Emacs depended on. Binnema has fixed that so now (as of Emacs 31.1) Emacs can support up-to-date xwidgets libraries again. That’s a real boon for me because I use xwidgets for both email in mu4e and for Elfeed.
In any event, I’m thrilled to see Binnema’s return even if it amounts to no more than a visit. I do hope, however, that I won’t have to wait 13 years for his next post.
This year I will join EmacsConf 2026 for a panel discussion. The
details are not available yet, though I expect them to be made public
in the coming days. You will be able to find them here:
https://emacsconf.org/2026/talks/community/. Follow the links on
that page to also learn about the full programme of the conference.
I am happy to be given this opportunity and am looking forward to it!
Until then, I wish everybody happy hacking with Emacs.
I just finished adding AGENTS.md and CLAUDE.md to each of my Emacs
packages. I copied the files from the emacs.git trunk. Those files
inform LLMs about the project’s policy to reject LLM-generated
contributions.
The reason for this change is that (i) I have assigned copyright to
the Free Software Foundation, (ii) all my code is distributed under
the terms of the GNU General Public License, and (iii) my packages are
designed to be compatible with core Emacs (all my packages can, in
principle, be part of emacs.git).
I do not want to merge changes that can jeopardise the legal standing
of my code base and, more generally, choose to remain aligned with
what the Emacs developers are doing.
Nudged by Ihor Radchenko's suggestion, I added some JavaScript to translate the graphical SVG schedule on the EmacsConf wiki to your local time zone.
I'll post the schedule on the wiki next week, but in the meantime, you can take a look at the draft schedule in the organizers' notebook.
Let me test it by setting my local time zone to UTC with sudo timedatectl set-timezone Etc/UTC…
Figure 1: Screenshot of the draft schedule in the wiki, showing times dynamically translated to UTC
Here's the horizontal view in our backstage index, showing the status of talks so far.
Figure 2: Screenshot of backstage view, showing times dynamically translated to UTC
I still need to make sure that my time zone is set to America/Toronto when I'm generating the SVGs, but at least now people can see the times translated to their local time zone.
A month ago, I wondered idly whether translation gadgets (for quick word lookup) exist, and while everybody said “just use your phone, dumbo”, that’s just too sensible for me. And way too inefficient.
So while I pondered what to do about it, I bought some keyboards to see whether that could be the solution.
Small keyboards (and the one above is as small as they come) is such a cursed category. Either the keys are just too horrible or the range is awful, or a combination of the two. So I wasn’t expecting the above to work (a DarkWalker Wireless Bluetooth Keyboard, M4 Mini Keyboard), but… the keys don’t seem awful, really?
Let’s see how it works, though — I’ve paired it with my laptop, and I’m going to write the word “cheville”:
Yeah. It doubles up key presses like crazy. And this is paired with my laptop, so the distance between the keyboard and the Bluetooth receiver is just a few centimetres.
Trying several times, I have yet to make it through “cheville” correctly even once — in addition to doubling keystrokes, it also loses some here and there.
It also seems to go completely AWOL if you let it sleep after pairing? Which may be a Linux problem for all I know. The range isn’t awful — I get five metres easily.
But while it’s a nice form factor, it’s completely unusable. So onto the next:
This is a Phistone Mini Keyboard with Triple Mode, so it’s got a 2.4GHz USB dongle in addition to the Bluetooth. Which, in my experience, usually works better on these types of things.
But man, that’s one ugly keyboard… and it works! I’m not getting any missed keystrokes or any doubled ones. So let’s start implementing something!
Let’s see… here’s my normal position in my reading chair, and I have the li’l ugly keyboard on the table next to me, and there’s a screen over there that normally displays the cover artwork of the album that’s playing on the stereo… So let’s see how efficient this is:
Hey! This actually kinda sorta has possibilities…
The Emacs over there is querying the Microsoft Azure Translation API behind the scenes — I tried a couple of other services first.
DeepL just returns one word, for instance, which is pretty useless when looking up words (because most have several meanings):
Thanks, Microsoft! Not everything you make is a crime against humanity!
(I mean… that I know of…)
The Emacs package works by grabbing the evdev device for the li’l keyboard, so that X doesn’t see any of the events. And then it just pops to a new window configuration and displays the input, and then finally queries the Azure API before popping back to where you were…
So this works, but that keyboard really is too big to be on my table here permanently. Does anybody know of a keyboard that’s more like that first keyboard, size wise, while working as well as this larger keyboard? Or perhaps not that small — something halfway between these two keyboards would be ideal. And not more keys than are needed — the small number of keys on that M4 keyboard is nice.
Over at techhub.social, lispwizard has a short post (or whatever techhub.social calls them) on saving window configurations to registers. He notes how easy it is to save multiple configurations and switch between them on the fly.
Saving window configurations and other data in registers is an extraordinarily powerful technique that all Emacs users should learn and master. There’s a problem, though, when you want to do this programmatically: which register should you use? How can you be sure that your choice won’t conflict with a register that the user has chosen manually for some other task? There are several situations in which I want to run an Emacs function in a single window—Elfeed is an example—and I do that by saving the current window configuration, deleting the other windows, running the required function, and then restoring the previous window configuration but how do I choose a “safe” register to save the window configuration in?
The answer is a trick I learned from Magnar Sveen years ago. Instead of using a letter to name the register, you use a symbol like :saved-windows. That works because when you name a register with a letter, Emacs uses a pointer to its symbol as the register name. Using a symbol name like :saved-windows works because the result is also a symbol pointer.
If you have the need to save something in a register programmatically, this is a good way of doing it. You don’t have to worry about conflicts because the user can not use symbol names for registers interactively.
[ The stream will be recorded. You can watch it later. ]
In a couple of hours I will resume the work I am doing on my Emacs
denote package. There are general refinements I wish to make, but
also to continue iterating on the new denote-data-mode, which is an
optional in-memory cache for Denote.
I will have the chat open in case someone has a question about what I
am programming or ANYTHING else they might want to ask me.
Please note that planet.emacslife.com aggregates blogs, and blog authors might mention or link to nonfree things. To add a feed to this page, please e-mail the RSS or ATOM feed URL to sacha@sachachua.com . Thank you!