Using Icons with Mu4e

Just a quickie from Álvaro Ramírez. If you’re a Mu4e user and would like to have an email’s status shown as one or more icons instead of a series of comparatively opaque letters but don’t want to deal with all-the-icons, Ramírez has the answer for you.

It’s pretty simple. You choose the icons you want for each status indication—or simply copy Ramírez’s—and add a series of configuration items to your init.el. Those items are listed in Ramírez’s post so take a look if your interested in adding your own.

Posted in General | Tagged | Leave a comment

A Conversation with Mickey

Syntopikon has an interesting interview with Mickey Petersen, the proprietor of Mastering Emacs and all around Emacs expert and expositor. He’s no stranger to Irreal readers so it’s always nice to see him discuss matters. The last time I remember seeing an interview with him was in 2014 in an on-line chat with Sacha Chua.

Like many of us, Mickey abandoned his first attempt to use Emacs. That was in his pre-college days when he was just discovering and learning Linux. Later, when he got to the university, he adopted Emacs party in reaction to the noisy voices insisting that all real hackers used Vim. When you read Mickey now, it’s easy to believe that he’s always had a thorough knowledge of Emacs and didn’t struggle like the rest of us. Of course, that’s wrong. He used it for some time before, as he says, the light came on and he realized the true potential of Emacs.

He also has an interesting exchange with the interviewer on the use of Emacs for non-technical or technical-adjacent users. The interviewer is an Emacs user too but he uses it for writing. I’ve long felt that all writers should at least try Emacs. After all, it’s all about wrangling text whether you’re a developer or a writer and Emacs excels at that. If you learn enough Elisp to make minor customization’s you can mold Emacs into a your ideal writing environment. Mickey believes that more could be done to make learning Emacs easier for the non-developer and he explores a few of those in the interview.

Like most things that Mickey’s involved with, the interview is interesting and worth reading. A few minutes of your time would be well spent.

Posted in Programming | Tagged | Leave a comment

Replying to a Sender Specific Email Address

Sebastian Schulze has an interesting post on handling email To and From addresses. His procedure when supplying an Email address to, say, a Website such as some-site.com is to specify some-site.com@his-domain.com where his-domain.com is his domain. That allows him to apply appropriate filters and discover the source of spam.

In order for this to work, he needs two things:

  1. His email provider must pass all email to him regardless of the user name.
  2. He has to set the From address on any replies to some-site.com@his-domain.com.

The first item is generally doable if you have control of your domain, especially if you run your own email server. The second is a lot harder with almost every email client. Fortunately Schulze uses mu4e so it’s relatively easy with a bit of Elisp.

Actually, mu4e can almost handle this out-of-the-box. You can specify your email addresses and mu4e will respond with the appropriate From address. Schulze’s situation is a little more complicated. You could do it with vanilla mu4e but you’d have to constantly housekeep your mu4e configuration. Schulze’s solution takes care of everything automatically.

The Elisp required is minimal so it’s an easy solution providing you have your own domain and are using mu4e. My own—not as good—solution is to add specific “possibly spam” addresses to my mail server and use that for sites that are possible sources of spam. Schulze’s solution is clearly superior and worth emulating if you can.

Posted in General | Tagged | Leave a comment

Fred Brooks

Fred Brooks was a computer scientist who, among other things, worked on the development of OS/360. He’s probably best known for his influential book The Mythical Man-Month, which has itself obtained a mythical status within our industry. The TL;DR of the book is that adding more engineers to a late project makes it later. Brooks speculated that the reasons for this are that adding engineers quadratically increases the amount of required communication and bringing the new engineers up to speed actually slows things down.

Sadly, Brooks died on Thursday at the age of 91. Steve Bellovin tweeted the news:

Even people who haven’t heard of The Mythical Man-Month are familiar Brooks’ Law, which distills the central lesson of the book. Of course, Brooks’ Law is honored more in its breach than in its observance, especially by managers who “just know” that a few more staff will solve all a project’s problems. Still, it’s worth reminding those who are inclined to add more manpower to a project that 9 women can’t make a baby in a month.

Posted in General | Tagged | Leave a comment

Red Meat Friday: JavaScript

With all the Sturm und Drang about Twitter, it’s time for Irreal to provide a little red meat—not about Twitter but about JavaScript:

Folks may disagree about Twitter but virtually everybody is united in their hatred of JavaScript even if it’s their main programming language. Or maybe especially if it’s their main programming language.

Posted in General | Tagged | Leave a comment

A New Take On Quitting Vim

Finally! A new take on the quitting Vim meme:

That’s actually pretty funny. Of course, as someone pointed out it could just as well apply to Emacs. Since this isn’t Friday, I won’t toss in red meat by noting that the real problem is that Emacs and Vim don’t have a menu item with a Quit entry1 for the cognitively challenged.

Footnotes:

1

Yes, yes. I know. This is a humor piece. Humor me.

Posted in General | Tagged , , | Leave a comment

Mike Zamansky Is Retiring

Mike Zamansky, who is well known to Irreal readers for his excellent, some say definitive, Using Emacs Series just announced that he is planning on retiring at the end of the Spring semester. In a series of three posts Zamansky lays out why he is retiring, what he feels he’s accomplished, and what his future might hold.

Irreal has focused almost exclusively on his Using Emacs Videos but I read all his posts and several of them are interesting even if not Irreal fodder. If you’re interested in CS education and how best to train new engineers, you should definitely be reading his blog. It’s low traffic so it’s easy to keep up with.

From a purely selfish point of view I hope he devotes all his newly found free time to making new Emacs videos but realistically we’ll be lucky and happy to get one every now and then. Whatever future he decides on, Irreal wishes him the best and is happy to recognize his many contributions to Emacs and CS education.

Posted in General | Tagged | Leave a comment

Solving Problems With Some Quick Elisp

I often read complaints about how hard it is to learn Elisp and that therefore we should rewrite Emacs in Javascript or something equally silly. The fact is, of course, that Elisp, like most Lisps, is actually easy to learn and once you’ve spend a bit of time with it, you’ve got a very powerful tool for solving text manipulation problems or, really, just about any problem at all.

Marcin Borkowski (mbork) has a short post that illustrates this nicely. Mbork’s problem is a simple one. He needs to replace all backslashes with double backslashes. That’s a trivial problem in Emacs but Mbork wants to replace only single backslashes so the obvious solutions like replace-regexp don’t quite do the job. No matter, he simply wrote a bit of Elisp that, he says, took him about 6 minutes including the inevitable debugging.

Folks are fond of pointing out, correctly, that Elisp is not the best Lisp but it’s more than good enough for its domain. Sure, things like name spaces would be nice but look at this way, part of what make Elisp so easy to learn is its simplicity.

Posted in General | Tagged | Leave a comment

Killing Processes From Within Emacs

Okay, okay: I’m weak and can’t stick to even the promises I make to myself. This is yet another post on Álvaro Ramírez’s dwim-shell-command framework. Yesterday, it was combining JPEGs into a single PDF file; today it’s killing processes from within Emacs.

I really like Ramírez’s solution but not for the reason you might think. It’s nice to be able to kill a process from within Emacs but I have almost no need to that. The reason is that I spend virtually all my time in Emacs so if any process needs to be killed, it’s usually going to be Emacs. The second reason is that when I do need to kill a process, I simply click on the Apple icon and choose Force Quit from the menu. That does require the mouse but it’s quick and easy and, most importantly, works even when Emacs is the application needing killing. Still, Ramírez’s, and your, workflow is likely different from mine so it’s easy to see how this can be a good solution.

Why do I like it, then? It’s that it’s a beautiful piece of code and shows how Elisp is well up to the task of retrieving and acting on system information that we usually think of as requiring low level system programming to get at. It’s all Lisp; no cheating by dropping into C or shelling out to a system utility. It’s very nice and well worth a few minutes of study.

Posted in General | Tagged | Leave a comment

Combining Jpegs

I keep promising myself that I’m not going to publish anymore posts about Álvaro Ramírez’s dwim-shell-command articles but he keeps finding compelling new applications for it. The latest is a problem I often have: combining several JPEG images into a single PDF. For me, this usually comes up when I want to combine several receipt images—a bill and credit card receipt, for example—into a single PDF for tax purposes. That comes up all the time in my workflow and Ramírez’s simple application makes it easy.

Ramírez’s post is a useful one if you aren’t aware of the dwim-shell-command framework because he lists all the applications that he’s made/discovered for the it. If, like me, you like to stay within Emacs but sometimes (or often) need to run some application from the command line, dwim-shell-command is just what you need. That’s especially true if the command has a complicated, hard to remember syntax. You encapsulate all the complexity in a simple Emacs function and invoke it from within Emacs. What could be better?

Posted in General | Tagged | Leave a comment