Emacs 28.0.92

Some good news from Eli. The third pretest for Emacs 28.1, Emacs 28.0.92, is now available for testing. As usual, if you can help with the testing by installing and using the pretest, please do so. The heroes who selflessly labor on our behalf will thank you and you’ll be helping speed the release of Emacs 28.

Posted in General | Tagged | Leave a comment

Twenty Two Years With Emacs

Arjen Wiersma has been an Emacs user for a long time: twenty two years. He has a lengthy post about that time that describes those years and also his current set up.

It all started for Wiersma when, after drifting among several editors for a while, his mentor told him to pick one and devote sustained effort into mastering it. He chose Emacs and all these years later he’s glad he did. The story of those years is an entertaining read and worth your time.

The last half of his post is about Wiersma’s favorite packages. No real surprises there; his list is pretty much like mine. It includes the big two—Org mode and Magit—of course but he also uses Org-roam, MU4E, Which-key, Eglot, and Projectile. Those are all packages that can have a huge influence of programmer productivity. Wiersma makes a case for each so if you were wondering if you should try one or more of them, take a look at his post for some reasons you should.

Wiersma’s closing thoughts include one that I’m always pushing: Emacs, far from being defunct, is getting better and better. As he says, “Here’s to another 22 years [of] Emacs.”

Posted in General | Tagged | Leave a comment

Good and Bad Tags

In response to my post How To Use Tags describing Karl Voit’s perspective on the use of tags, Christian Tietze pointed me to a post by Sascha Fast on The Difference Between Good and Bad Tags. Fast makes a good point. The TL;DR is that you should use object tags instead of topic tags.

Fast illustrates the difference with the “diet” tag. If you think of it as a topic, you get all sorts of things thrown into the bin. If it’s in any way related or might be related to a diet, the diet tag will apply. The problem is that it’s not very useful. The category is way too broad and when you search on your “diet” tag you get too many entries, most of which are not what you’re looking for.

If, on the other hand, you treat your tags as naming an object, anything thing with that tag is in some way a diet. So “The Scarsdale Diet” would get that tag because it’s an actual diet but “high glycemic foods” would not because although it’s concerned with dietary matters it doesn’t actually describe a diet.

Take a look at Fast’s post for more detail on the distinction. Tagging can be a big help in searching for items but it’s important to assign them intelligently. Voit and Fast’s posts can help you devise an effective tagging strategy.

Posted in General | Tagged | Leave a comment

Stevey’s Guided Tour of Emacs

Steve Yegge, who is always interesting, has a nice video that he describes as a guided tour of Emacs. Yegge characterizes it as covering “roughly 12 features of Emacs, out of approximately 18 billion hillion jillion total”.

If there’s an overreaching theme to the video it’s that everything is a buffer and that therefore all the usual editing functions are available to work with it. The other important point Yegge makes is how easy it is to customize Emacs. Not only for trivial things like binding key sequences but for writing functions to automate your work flow or even writing an entire mode if needed. As he says, this would be an essentially impossible task with something like IntelliJ but is trivial with Elisp.

The video covers things like calc, shells. keyboard macros, and Dired. He also shows opening a gzip file, selecting and opening a file in the archive, editing that file, and saving it back to the archive. That’s always seemed like magic to me but turns out to be useful more often than you’d think.

The thing that stands out about the video is how enthusiastic Yegge is about Emacs. As he says, he’s still using Elisp he wrote 20 or 25 years ago. That shows, he says, that Emacs is a worthwhile investment that will pay dividends over a lifetime.

The video is just over 45 minutes so plan accordingly. It’s definitely worth watching.

Posted in General | Tagged | Leave a comment

Duck Duck Go Becomes Google

Most Irreal readers know I’m not—more precisely, no longer—a fan of Google. The usual reason that I give for that is the fact that Google gobbles up as much of our private information as it can. But there’s another reason that I don’t mention as often: Somewhere along the line, Google decided they should filter the information they present to me to eliminate anything they felt wasn’t good for me. I’m an adult and don’t need anybody deciding what I should and shouldn’t hear based on their opinion of the subject at hand.

I first started using Google because they gave the best search results available. Sure, they ranked the results but in a way that reflected which sites were most popular as reflected by the number of incoming links. Over time, that changed where a major—if not the major—deciding factor was whether the result was in accord with Google’s sense of what was “right and just”. In other words, whether or not a result was in agreement with the prevailing Google politics. Who wants that? It’s like reading Pravda: you get information but have no idea of how complete or truthful it is.

Happily, there was a solution for both problems: Duck Duck Go. They didn’t vacuum up our information and they were pretty much an honest broker giving us whatever data was out there. Now sadly, DDG has apparently decided that Google was right after all:

I get it. Everyone wants to do something to help the mess we find ourselves in but censorship is never the answer. We’re adults and can judge for ourselves what to believe and what to discount. We don’t need unknown functionaries deciding for us. Especially given the results of filtering “misinformation” that we’ve seen over the last couple of years. It’s shocking how many instances of “misinformation” were subsequently rehabilitated to be conventional wisdom. The people responsible for that are the last people I want telling me what to think.

If you’re a DDG user and want to get all the information available so you can make your own informed opinion, let DDG know that you’re not happy with this decision and ask them to reverse it.

Posted in General | Tagged | Leave a comment

Happy Birthday Dark Side of the Moon

This is the day that Irreal celebrates the 49th anniversary of Pink Floyd’s iconic Dark Side of the Moon. It is one of the most successful albums of all time and still has a devoted following. Here at Irreal, it can often be heard making everyone’s day a little brighter.

As I do every year, I’m offering a cut from the album. This time it’s Us and Them.

Of course, as I say every year, the best cuts from the album were the last two: Brain Damage and Eclipse. You can listen to them from the 2019 post.

Posted in General | Tagged , | Leave a comment

Transient Input Method

Marcin Borkowski (mbork) has a short post that brings news of an upcoming feature in Emacs: transient input method. It’s much like toggle-input-method used to switch to another input method but it’s only in effect for the next character. That can be handy if you need to enter, say, a LaTeX character but don’t want to stay in TeX input method all the time. Of course, you can always just toggle the TeX input method off again but that’s a bit of a pain.

I use the TeX input all the time. It’s usually because I want to use --- to enter an em-dash. That works without TeX input method but the Unicode character it uses messes up the RSS feed. The em-dash character used by TeX input method works correctly so I have to switch input methods to use it. The trouble with the TeX input method for me is that my key chords (as defined with the key-chord package) don’t work so I have to either toggle the input method again or use some other way invoking the function bound to the key chord.

Transient input method isn’t available in Emacs 27.2 so I haven’t had a chance to use it yet but it seems like it could really be handy much of the time. As Borkowski points out, transient input method is an example of polishing Emacs to make editing a bit more pleasant and once again puts the lie to the claim that Emacs is old, defunct technology.

Posted in General | Tagged | Leave a comment

Rectangle Mark Mode

Today, I saw this tweet from Tory Anderson:

It reminded me that I used to use it all the time and thought I even had a shortcut for it but when I called describe-function it said there was no binding associated with it. I searched my init.el and found that it was actually defined as part of a hydra dealing with rectangles.

I was happy to rediscover this and am writing about it in case some of you may have forgotten about it too. In a sense, it doesn’t really bring anything new but it does make it much easier to visualize the rectangle and how the text will be affected when you issue a command on it.

I stole the hydra from this post by abo-abo. The thing with rectangles is that most of us don’t use them enough to burn the keystrokes into our muscle memory, so the hydra is really useful. Of course, you still have to remember that you have the hydra and what its keybinding is. Something not all of us, apparently, can do.

Posted in General | Tagged | Leave a comment

Understanding Hi-line-mode

Tony Aldon wondered how hi-line-mode worked so he looked into it. He was so enchanted with what he found that he decided to share it on reddit. That might not sound too interesting but hi-line-mode depends on two Emacs features, post-command-hook and overlays, that are interesting in their own right. Once you understand them, understanding hi-line-mode is trivial.

The post-command-hook variable, as its name suggests, contains a list of functions to run after every command. Since virtually everything Emacs does—including inserting characters into a buffer—is through a command, the hook gets run every time Emacs does something. In particular, hi-line-mode can be called after every command to update the current line’s highlighting.

The other important aspect of hi-line-mode is the overlay. This is pretty simple and allows you to, among other things, change the text face of a region in the buffer. In the case of hi-line-mode, it changes the background color of the current line to whatever color you’ve chosen.

Once you grok hooks and overlays, it’s easy to understand how hi-line-mode works. Aldon’s post is useful not because it explains how hi-line-mode works but because it explains post-command-hook and overlays. Those are things you can use in your own Elisp code.

Posted in General | Tagged | Leave a comment

Reading RSS With Elfeed

Irreal regulars know that I’m a huge fan of Christopher Wellons’ Elfeed. It’s an Emacs-based RSS reader that allows you to manage and read your RSS feeds from within Emacs. If you’re already an Emacs user, there’s no reason not to be using it.

Ramces Red has a post that explains how and why to use elfeed. Ramces covers the installation and configuration of Elfeed. Other than specifying which feeds you want to follow, you can get away with no configuration at all but Elfeed allows extensive customization. There’s also a thorough and flexible tagging mechanism that you can use to sort posts according to interest.

To me, the most useful thing Elfeed brings to RSS is the ability to store the feeds forever. They all go into a database that is searchable by date and content. Even years later, you can search and find an entry and as long as the original post is still online, you can revisit it.

The one thing that his post doesn’t mention is that you can maintain your list of feeds in Org-mode. To do that you need to load elfeed-org. After that, it’s easy to add or delete entries from your feed even if you aren’t an Elisp expert.

I can’t recommend Elfeed enough. Take a look at Ramces’ post to see why.

Posted in General | Tagged | Leave a comment