EmacsConf 2022 is Coming

Leo Vivier announces on the Emacs subreddit that the 2022 EmacsConf is scheduled for December 3rd and 4th. The conference will be live streamed so you needn’t travel to participate. Most of us won’t be able to watch the whole thing live but here’s a schedule in case you’re particularly interested in a particular talk.

The conference guide doesn’t say (that I can find) whether or not the recordings of the talks will be available for later viewing but they almost certainly will be. The organizers are promising more information as the conference itself approaches.

UPDATE [2022-11-07 Mon 11:32]: Sacha notes in the comments that they will be posting the videos.

Posted in General | Tagged | Leave a comment

Emacs Modifier Keys in X-Windows

Most Irreal readers know that Emacs offers the Hyper and Super modifier keys for use in keybindings. Less well known is that there is also an Alt key. It’s not the Alt key that appears on most modern keyboards that Emacs usually maps to Meta but a separate modifier. Sadly, we no longer have the Space-cadet keyboard so special effort is required to map them to existing keys. Usually, this means giving special meanings to the right modifier keys and perhaps the Window key if you have one.

This isn’t too hard on macOS but can be tricky under X. Over at Emacs Notes there’s a very nice post that shows you how to use the xkb file to set up all these keys. It’s very fussy but only needs to be done once. After that, you can enjoy the full set of Emacs modifier keys.

In the Emacs Next Step branch there are variables to set up the modifiers so you can simply add them to your init.el, possibly conditionally evaluated, to make your configuration portable to other OS environments.

The utility of doing all this may not be clear but I use Hyper as a modifier for many operations—either existing or homegrown—that aren’t already mapped. Once you have these keys, you’ll find all sorts of uses for them.

Posted in General | Tagged | Leave a comment

The Coverup Begins to Unravel

Irreal has long been suspicious about the back story of COVID-19. As I’ve written before, if you put on your scientific hat, the only possible conclusion is that there’s not yet any definite resolution to covid-19’s genesis. But if you think about it as an intelligent, knowledgeable citizen, the story being flogged by the press and the various governments involved just doesn’t pass the smell test. The unremitting insistence that any explanation other than the zoonotic one was a conspiracy theory and that there was nothing to see, please move on, left even the least cynical of folks wondering what was going on.

Now the coverup is beginning to unravel. Two recent revelations herald the unraveling. The first is a paper by Buttel, Washburne, and VanDongen claiming that an endonuclease fingerprint of the virus indicates that it was synthetic. That means, of course, that the lab leak hypothesis that many felt was the best explanation of COVID-19 is correct. If you know a little biology or chemistry, this article by Anandamide steps you through the analysis and even points you at the SnapGene Viewer tool that helps you with the analysis.

The second is a joint ProPublica/Vanity Fair article that reports on an extensive Senate investigation of documents obtained from Wuhan laboratory that strongly suggests that there was a serious biosecurity breach at the Wuhan labs just prior to the emergence of COVID-19. The story is very complex and involves plumbing the mind numbing depths of Chinese Communist “Party Speak”. Read the article for details. It’s long and complex but worth your attention.

That (even) the U.S. officials responsible for enabling and covering up this debacle will be brought to justice is probably too much to hope for but we can at least hope for an end to the dangerous and probably useless gain-of-function research before it manages to kill us all.

Posted in General | Tagged | Leave a comment

Mickey on Readline

Mickey has another great post that will be immediately useful to almost every Irreal reader. The post is about the functionality of the GNU readline library. As Mickey says, almost everyone knows that readline (or at least BASH) implements the basic Emacs (or Vim) cursor movement keybindings and almost as many know about moving backward in the command history with Ctrl+r. Sadly, that’s the extent of most people’s knowledge about readline. There’s a whole lot more, though.

Mickey notes that the problem is particularly acute with Emacs users because, after all, they mostly stay in Emacs and even deal with the shell through Emacs. That means they have all that functionality automatically so they never explore what readline is capable of. I know that’s true because I wrote about readline’s functionality back in 2019 and resolved at the time to do better about using readline’s editing capabilities. Of course, I didn’t and now I know why. As an Emacs user I just didn’t use readline enough for it to stick. On the other hand, it’s mostly the same Emacs so the muscle memory should already be there.

Probably the most surprising thing about readline—and its most unknown—is its macro capability. Very much like keyboard macros in Emacs, it’s possible to record, optionally save, and playback an input sequence. That has obvious applicability for repeatedly entering some complex input string or part of one. Mickey has lots of examples so be sure to check out his post. As always with Mickey’s offerings, your time will be more than repaid.

Posted in General | Tagged , | Leave a comment

An Org-mode to DOCX Pipeline

Erik L. Arneson has a useful post that describes his method of converting an Org document to DOCX. His reason for doing that is the usual: his clients want a Word document but like all right thinking people, Arneson prefers to write in Org. His workflow lets him have both: a sane document preparation environment and an output that meets his clients’ needs.

Those of you familiar with exporting Org documents know that there are two ways of doing this. One is export directly to DOCX and the other is to use Pandoc. Most observers feel that Pandoc does a better job with DOCX so that’s what Arneson uses.

The post describes how to set up a template for the conversion so that you get a nice looking Word document. His workflow is complicated by the need to deal with several templates depending on the client and project. Because of that, he runs Pandoc from the command line but, as he admits, it’s possible to use ox-pandoc to automate all that by providing a bit of header matter in the Org document.

Having to provide a Word document is terrible, of course, but it’s depressingly common so Arneson’s how to is welcome. His post notes two negatives. First, he usually has to tweak the final Word document in LibreOffice to get it to look just right. Secondly, and much more depressing, is that many clients are now asking for a Google Docs document. That’s depressing because there’s no good Org to Google Docs pipeline but more importantly because no sane person or organization should be using Google Docs. Irreal has discussed this last point so many times that most of you are probably tired of reading about it. Still …

Regardless, if you have to produce Word documents but prefer a sane editing environment, take a look at Arneson’s post.

Posted in General | Tagged , | Leave a comment

Speeding Up Emacs Garbage Collection

Tyler Dodge over at Living the Dream Blog has a very interesting post on his research on Emacs garbage collection time. He discovered that a a simple parameter change could reduce garbage collection wall clock time by 50%.

The change has to do with the size of blocks allocated to hold cons cells. The TL;DR is that increasing the size improves locality and produces a significant decrease in run time for garbage collection. Take a look at the post for the details but the interesting thing is that the change itself is simply a change to a single parameter.

From what I can tell, the commit that Dodge describes is to his fork of the Emacs distribution but it’s certainly something that deserves consideration by the Emacs maintainers. To be sure, Dodge’s experiment was restricted to the macOS platform but it will probably apply to other platforms as well.

The post is fairly short and well worth spending a couple of minutes reading. It’s a reminder how a simple change can have profound effects.

Posted in General | Tagged | Leave a comment

Another Hugo Blogging Workflow

Andrey Listopadov has (yet another) post on blogging with Hugo. His post is distinguished by his attempt to be comprehensive. He says that when he was trying to start blogging all the “how to” posts were too shallow to be helpful and that he wanted his to be truly useful. His other desire was to show how to use Emacs and Org-mode in the workflow.

If you want a static blog—and there are plenty of reasons to prefer that—then this is a very useful post to read. Even if you don’t want to write in Emacs and Org there is a lot of useful information on how to get started. Most of the information is a step-by-step guide to setting up a Hugo blog so I won’t repeat it here; take a look at the post for the details.

One of the things I liked most about his post was a sort of afterthought. Listopadov asks if you, the reader, should start blogging. He concludes that, yes, you should. His reason for thinking so is neatly captured by Daniel Boorstin’s (the 12th Librarian of Congress) famous quote, “I write to find out what I think.” Actually, the full quote is even better: “I write to find out what I think. After all, the bars aren’t open that early.” Humor aside, it’s a great point. I often find that I don’t understand something until I write about it. If you’re an engineer, you may find that you’ll understand a problem better after writing about it. What better place to do that than a blog?

Posted in General | Tagged , | Leave a comment

Playing YouTube Videos in Emacs

Marcin Borkowski often watches long YouTube videos (frequently lectures) and sometimes can’t watch the whole thing in a single sitting. A couple of weeks ago, he wrote a post about capturing the elapsed play time where he left off and adding it to a link to the video that he maintained within Org-mode. That way when he followed the link, the video would start where he left off.

He’s discovered what he describes as a “much much better solution” to the problem. And it really is. He leverages a youtube-dl fork and mpv to play YouTube videos directly from Emacs. That’s already pretty nice but mpv can also remember where you left off so that you don’t need anything fancy to help you remember. There are a couple of ways of doing that so be sure to check out Borkowski’s post for the details.

Oddly, the code to do all this is simpler and shorter than the code to capture the time and add it to a link. If you want to store links to YouTube videos for later watching and be able to remember how much you’ve watched, this is a great solution.

Posted in General | Tagged , | Leave a comment

Undo In Region

Over at the Emacs subreddit, tms9918 says he sometimes changes a line, make changes in other parts of the file, and then wants to restore that first line. He was asking if there was anyway of doing that. There is, of course, as I’ve written before. The thing is, tms9918’s post was full of comments expressing wonder at how the commenter didn’t already know this. That led me to believe that a reprise of the issue was called for, especially since it’s so useful.

It is, after all, a situation that comes up often: you make a series of changes and then find that you want to undo one of the earlier changes. It’s extraordinarily easy to do. All you need do is highlight the region you want to restore and undo will apply only in that region. It works out-of-the-box if you’re using the default Emacs undo system. If you’re using undo-tree, you have to set undo-tree-enable-undo-in-region to t in your configuration.

You don’t need this all the time, of course, but when you do it’s easy to remember how to do it. There’s not special key binding to know or lookup. You simply highlight the region you want to restore and invoke undo in the usual way. Try it out; you’ll be delighted.

Posted in General | Tagged | Leave a comment

Organizing Your Life With Org Mode

Karl Voit has reposted an article from 2018 on using Org-mode to organize your life. Voit, as many of you know, is very interested in personal information managers (PIMs) and curating information for later retrieval. He says that when he discovered Org-mode, he knew he had found a tool to last him a lifetime. Partly that’s because the functionality is so rich and extensible but mainly because everything is in text.

Having everything in text future proofs Org mode because the files will always be readable by any application that can deal with ASCII or UTF-8. To be sure, you won’t have all the display and processing capabilities outside of Emacs but the files are still readable and easy to translate into any format.

Voit compares Org-mode to a box of Lego blocks. Everyone can take whatever blocks they want from the box and build a customized work environment tailored exactly to their workflow. Voit says he spends about 90% of his computer time inside Org-mode. That seems a lot but Org enables so many different workflows from literate programming, to document preparation, to record keeping, to blogging, to handling agendas and itineraries that it’s easy to use it for just about everything.

Org-mode is probably the most important part of my workflow and I wouldn’t want to do without it. If you aren’t already using Org, take a look at Voit’s post to get an idea of why you might want to.

Posted in General | Tagged , | Leave a comment