Deskstop Save Without The Restore

Srijan Choudhary likes desktop-save-mode but he wants a slightly different behavior. He likes having his session configuration saved but he usually doesn’t want it restored. He wants to restore it only when he closed it by mistake or forget do something in the last session. Then, he wants to restore it by hand.

He could, of course, do this by disabling desktop-save-mode and calling the save and restore functions manually. The problem with that solution is that like most of us Choudhary would forget to do the save.

But this is Emacs so Choudhary was able to roll his own solution. That solution does the automatic save, as usual, but the restore function is disabled at system startup. Instead, the last save is added to a list of the last 5 saves. When he wants to restore a session, he’s presented with the list and can choose the save that he wants.

This is another great example of how Emacs lets you have it your way. His code is a little complex but there are a lot of desktop save peculiarities to account for. If you’re like me, you probably aren’t interested in this capability but that’s the point: even if you’re the only one who wants some functionality, Emacs will let you have it. This capability is something no developer is likely to anticipate so it provides another example of the superiority of Emacs’ method over the typical extension system provided by other editors.

Update [2026-08-10 Mon 10:52]: Added link to Choudhary’s post.

Posted in General | Tagged | Leave a comment

A Customized Agenda View

Ashish Panigrahi has an interesting post on customizing his agenda view. He’s a graduate student, apparently in the sciences, and has to keep track of his tasks and their statuses. The natural solution for us Emacsers is to use Org mode and the agenda view to track these things.

There’s nothing exciting about that, of course, but what makes his post interesting is that he shows how to create a custom agenda view. It’s easy to make a custom view and I have a lot of them but they’re pretty simple. Panigrahi views are more complex and he demonstrates how to specify more intricate criteria for the view.

For his main view, he wants to show tasks that he’s completed since his last group meeting. That means he wants to filter for tasks completed in the last 7 days that aren’t personal items. He also wants to keep tags, so he makes sure they aren’t removed.

Finally, since he often consults this view, he has a function that calls it with a simple Ctrl+c w rather than having to go through the agenda dispatch menu.

As I said, you probably won’t care about his particular view but it’s instructive to see how he defined it as a jumping off place for your own views.

Posted in General | Tagged , | Leave a comment

Emacs 31 And The Speedbar

Protesilaos Stavrou (Prot) has another excellent video. This time it’s on it’s on the Emacs speedbar and its Emacs 31 upgrade. The TL;DR is that as of Emacs 31, you can configure the speedbar to be displayed in a separate window instead of a separate frame. The video is 15 minutes, 39 seconds so it should be easy to find time for it.

The placement of the speedbar matters a lot to Prot. He found the speedbar to be unusable when it was displayed in a separate frame because it was difficult to deal with the two related frames. It’s absolutely impossible for me to deal with because I run Emacs as a full screen app so the speedbar is in another workspace and I have to switch to that workspace to see it.

Now that the speedbar can be displayed in the same frame, Prot finds that it can be useful when dealing with large projects with many files. His video is mostly concerned with showing how the speedbar works and what you can do with it.

Lots of people love speedbar-like applications and swear by them. I, however, have never been able to warm up to them. These days, I don’t work with large projects and perhaps I’d feel differently if I did but mostly they just seem like noise to me. Even Prot says he doesn’t use speedbar for his smaller personal projects but that it can be useful for larger, multi-file projects.

My recommendation is that if you don’t already strong opinions on the matter, give the speedbar a try when Emacs 31 comes out and see if it works for you. There are plenty of informed opinions on both sides of the issue so there’s no right answer, just what works for you. As always, Emacs will let you have it your way.

Posted in General | Tagged | Leave a comment

Displaying The Active Clock

Over at Ray on Emacs, Raymond Zeitler has an interesting post on displaying the Org clocked in status. The default is to display it in the mode line but Zeitler wanted to display it in the title bar too. It turns out you can turn it off, display it in the mode line, display it in the title bar, or display it in both the mode line and title bar. These choices are controlled by the org-clock-clocked-in-display variable.

If you regularly clock in your tasks, having flexibility in where the status is displayed could be useful. The problem is I couldn’t find any reference to this variable in the help system or in timeclock.el, which handles the seemingly related timeclock-mode-line-display.

I updated my packages to make sure I had the latest Org Mode (I’m on Org 9.8.8) but I got the same results. I’m guessing that Zeitler is using one of the Emacs 31 prereleases, which implements this. If you’re interested in this feature and are on Emacs 31Try it on your system and see what happens. If it works for you, leave a comment.

Posted in General | Tagged | Leave a comment

Another Reason To Use An Ad Blocker

Long term Irreal readers know that I’ve always been ambivalent about ad blockers. On the one hand, many Web sites that provide content need to make money to survive and the only generally effective way of doing that is through advertisements. That does not mean, though, that Irreal or any of you are therefore consenting to abuse. Sites that use tracking techniques to follow you and record your online actions are not ethical and should be illegal.

So the other hand is that users have to protect themselves and unfortunately those—probably few—ethical advertisers suffer. I’ve always said that I’d turn off my ad blocker if the advertisers turned off their trackers. I doubt the makers of ad blockers have much to worry about.

Now there’s another reason to use an blocker. The abusers have themselves been abused. The TL;DR is that the digital advertiser service, Adform, was hacked and started serving malware that stole crypto currency from the infected users. Since Adform serves about 1.5 billion ads a day, that’s potentially a lot of infected computers.

Adform, of course, had nothing to do with the malware other than that their (hacked) servers were used to distribute it. That’s the point. Even if Adform delivered only ethical ads with no tracking, you’d still want to block them to avoid malware. This fact in conjunction with the ad industry’s intransigence means that it would be foolish for anyone to forego the safety of an ad blocker.

Posted in General | Tagged | Leave a comment

I 🩷 RSS

I don’t use social media. Why would I? Who wants some algorithm telling you what to read and filtering your own content? What I do like is RSS. You see messages about all the content from all the sites you’re interested in. As I’ve said before [1, 2], I really like RSS and I’m sad that Google and others pushing social media did everything they could to kill it. But, after all, it wasn’t monetizable.

Fortunately, despite what the pundits will tell you, RSS has survived and is prospering among those who haven’t been lobotomized by social media. Among those people is Andrew Shell who has a site where people who feel similary can list their webpage and agreement.

If you have a Web site and agree, send your site’s URL to Shell and get your site on his list of sites that love RSS.

Posted in General | Tagged | Leave a comment

The Em Dash And Emacs

Irreal, as you all know, is an em-dash friendly site. Irreal has always liked them and now we like them even more because it puts a thumb in the eye of those mentally challenged folks who claim, erroneously, that “real people” don’t use em-dashes and their presence in a document is a sure sign of AI generated text.

It turns out that JTR over at The Art Of Not Asking Why is also an em-dash aficionado and has been struggling with how to enter them, especially when using Emacs. His final solution involves expand-abbrev but seems to me overly complicated. He types --- then immediately calls expand-abbrev by typing Ctrl+x `.

We here at Irreal have the same problem, of course, but solved it in what seems to me a much simpler way:

(defun jcs-insert-em-dash ()
  "Insert an em-dash at point"
  (interactive)
  (insert 8212))

and

(global-set-key (kbd "H--") #'jcs-insert-em-dash)

I have Hyper bound to the right ⌘ Cmd key so it’s really easy to invoke it: thumb on Hyper and index finger on - and it inserts an em-dash directly into the source exactly as JTR wanted.

I don’t claim my solution is better than JTR’s, only that it suits me better. It’s just another example of Emacs letting you have it your way.

Posted in General | Tagged | Leave a comment

Lisp Dialects Compared

Elia Scotto has an excellent post on the major Lisp dialects. There are, of course, several Lisp flavors and while they share many features—including, more or less, syntax—there are nevertheless differences that make the choice of which one to use nontrivial.

That’s where Scotto’s post comes in. He compares Common Lisp, Clojure, Racket (Scheme), and Elisp. He describes each dialect, its strengths, and its weaknesses. The TL;DR is:

Common Lisp
The oldest most complete Lisp, it had libraries and functions for almost everything. It’s premier implementation, SBCL, operates on a large range of hardware and compiles to native code. Its generated code rivals that of C.
Clojure
A modern dialect with some syntactical oddities, this Lisp runs on the JVM, which makes it perfect for large business apps running on Java. Scotto recommends Clojure as a first choice for a beginner looking for a practical and elegant Lisp.
Racket
Racket is a Scheme derived Lisp that’s particularly strong for designing and implementing new languages. Unlike the other Lisps, Racket lets you specify a syntax for your new language even if it’s not a Lisp-like syntax.
Emacs Lisp
Irreal readers probably need no introduction to Elisp. Scotto describes it as an older, limited extension language for Emacs but it is, of course, much more. I—and many others—use it for building tools and one-off internal apps.

There’s a lot more detail in Scotto’s post so be sure to a look at it.

Posted in General | Tagged | Leave a comment

Apple Advertising

This week, I came across a couple of posts feeding my new hobby horse: Apple’s descent into advertising. Like almost everyone else, I HATE, HATE, HATE having ads pop up when I’m trying to do something else. It’s bad enough on Web sites where at least they have the excuse of having to make money some how but it rises to intolerable when they put them up on a device I’ve already paid for.

The annoyance is reason enough to dislike Apple’s ads but for me the worst thing is that they’re corrupting and inevitably lead to the user being replaced by the advertiser as the customer. I’ve said all this before and now John Gruber at Daring Fireball is making much the same argument. He says ads in software are like stickers on your laptop. Apple has always considered the stickers an abomination and refused to put them on their hardware. Gruber reminds us what Steve Jobs had to say about those stickers:

You know, we put ourselves in the customers’ shoes and we say, what do we want stuck on our product when we take it out of the box? And the answer is, nothing.

The same principal applies, I submit, to advertisements in software. We’re not talking about freeware here but to software that we purchased as part of the price of our Apple products.

Meanwhile, Jason Snell over at Six Colors makes the analogy of checking into an expensive but good hotel. You expect things to be perfect: the soap smells nice, the refrigerator is maintained, and the pool is clean. The hotel, of course, can save money by scrimping on those things but if they do they become a lousy but expensive hotel.

It’s the same with Apple. We’re willing to pay more for their products because they’re excellent and give good value. If Apple starts sullying those products, suddenly that extra cost doesn’t seem as worthwhile.

I hope Apple abandons this misadventure. It’s not like they need the extra cash.

Posted in General | Tagged | Leave a comment

🥩 Red Meat Friday: The Scourge Of Dickovers

Over at Pluralistic, Cory Doctorow has a righteous diatribe about dickovers. If you’re not familiar with the term, dickover was coined by John Gruber to describe those super annoying popups that cover the text you’re trying to read. They’re bad enough for those of us in the U.S. but Doctorow says they’re even worse in the UK and EU where they’re used as a sort of malicious compliance with the GDPR.

The thing is, those popups asking if we consent to the use of cookies are completely unnecessary. The law says that sites must presume that users do not want to be spied on and the popups are simply a way of tricking users into giving that consent. It appears to work. According to the Kill The Cookie Banner site, 90% of people agree to the spying by simply clicking through so they can get on with reading whatever they came to see.

A lot of Doctorow’s post describes ways of dealing dickovers but the salient point for me is the “Global Privacy Control” (GPC) signal. That’s an indication that browsers can send to websites saying that the user does not give permission for their spying. The surveillance industry hates this, of course, and largely ignores it. There are efforts in the EU to make compliance mandatory and a couple of states in the U.S. have already done so. The advertisers are, naturally, against this and have pulled out all stops to scuttle the legislation.

It’s fine to deploy stopgap measures—such as those recommended by Doctorow—to fight surveillance advertising but the real solution is to make the advertisers follow the law and stop offering specious reasons why they can’t or won’t obey it. A good first step is to make honoring the GPC mandatory.

Posted in General | Tagged | Leave a comment