Installed Emacs 25.2

Emacs 25.2 is mostly a bug-fix release and I haven’t had any problems so I didn’t bother installing it as soon as it was released. Still, Irreal likes to be up-to-date on all things Emacs so I finally got around to compiling and installing it. Really, compiling it from source isn’t much harder than using homebrew or one of its siblings.

Here’s the recipe for compiling and installing it on macOS:

cd path-to-untared-source
configure --with-ns CFLAGS="-g3 -O2 -I /usr/local/include/libxml2"
make
make install
sudo mv nextstep/Emacs.app /Applications

I always mv my current Emacs to a backup version but that’s probably just irrational paranoia. The above recipe builds Emacs with EWW support. If you have additional needs, you may have to adjust the configure.

UPDATE [2017-04-27 Thu]: John Mastro commented that he thought specifying the CFLAGS variable to configure overroad the default value, which turns on some optimization. After some investigation, which you can read about in the comments, I discovered that that was indeed the case. I rebuilt Emacs with the new configure invocation shown above. If you followed the old recipe, you may want to do the same.

Posted in General | Tagged | 9 Comments

Irreal Is 6

Today Irreal, in its current incarnation, is six years old. For the last 5 years I’ve posted pretty much everyday.

In its original incarnation as a Blogger blog, I had in mind that Irreal would be mostly about Scheme and Lisp and would feature answers to the exercises in SICP. Things turned out differently, of course, and now I write mostly about Emacs, Security, and government surveillance on its citizens.

Six years (or 8 if you count the original Irreal) seems like a long time but then I look at people like Sacha Chua who’s been blogging so long it seems as if she must have started when she was her daughter’s age. So as much as the idea of retiring and living off the generous Irreal International Pension Fund sometimes seems attractive, I’ll probably just keep on pounding out prose until my long suffering readers beg for mercy and start throwing tomatoes.

Posted in Blogging | 1 Comment

Listing Org Tags

Chris over at the cpb83 blog solves a problem that many of us probably have. If you’re an Org mode user, you probably make use of the agenda and organize your data with tags. The problem is that if your agenda tracks several Org files, like mine does, and you use tags liberally, you’ll likely forget which tags you have. Was that tag “grocery” or “groceries?”

Swiper and similar utilities help with this a bit but, in the case of swiper, only the first tag for an entry. Chris shows us a bit of Elisp that goes through your agenda files and compiles a sorted list of all the tags in use. That’s a useful thing to have by itself but the code also demonstrates how to search Org files. Org has several functions, such as org-map-entries, that make the searching easier. Chris’ code shows how to do that and can serve as a template to search for something besides tags if you need to.

UPDATE [2017-04-26 Wed 09:19]: The cpb83 blog has been taken down but you can find Chris’ post and the code here.

Posted in General | Tagged , | 8 Comments

A Synchronized Shopping List for Linux/Android

Karl Voit has an interesting post about a synchronized shopping list for him and his girlfriend. He had a promising solution leveraging Wunderlist but after a week of working on it, he discovered that Wunderlist had been acquired by Microsoft and would shortly be discontinued in favor of a homegrown Microsoft solution.

This illustrates an important general principal that I follow as much as I can and that Voit has written about before: Don’t depend on cloud services. There are at least two very good reasons for this. First, you can lose control of your data at least to the extent that third parties have access to it and second, you may lose the data altogether. That can happen when the cloud service is discontinued, for example, or when the provider decides that they don’t like you for some reason and lock you out of your account and data.

All that said, I do sometimes use cloud services—especially Apple ones—but I never commit important data to them or proprietary applications. So, for example, I maintain my shopping list in the Apple Reminders app because it’s not important data and I can share the list with my wife easily. The Reminders app, in fact, meets all the must-have and most of the nice-to-have requirements that Voit mentions in his post. If Apple discontinued Reminders tomorrow, the worst that would happen is that I would have to go through the pantry to figure out this week’s list again.

Better still, though, is Voit’s new approach: build an Emacs/Org solution. That’s not that hard to do, especially with Linux and Android, which have apps that can communicate between your laptop and phone. I don’t know how technical his girlfriend is but I can see this approach resulting in a process that’s mainly useful for geeks. On the other hand, the nice thing about shopping lists is that you can probably get by with having it be read only for the less technical partner and probably even entering data could be made straightforward.

The important thing is that the solution is entirely open source and under Voit’s control. He doesn’t have to worry about the service being discontinued, someone spying on his grocery list, or violating some vendor taboo and being cut off from his data.

Posted in General | Tagged , | 2 Comments

A Warning Ignored

I tried to warn Grant but he wouldn’t listen1. Now I’m running around with my hair on fire yelling at a cloud.

Footnotes:

1

Actually, it’s an old post predating my warning but someone just posted a link to it on Hacker News so I’m still holding Grant responsible.

Posted in General | Tagged , | 1 Comment

Emacs 25.2 Has Been Released

The latest release of Emacs, Version 25.2, has been released. Despite the title on the announcement at the link, it really is 25.2 not 25.1.

Posted in General | Tagged | Leave a comment

Paredit Video

If you’re working in a Lisp type language, you really want to be using paredit (or possibly smartparens). Smartparens can be used for any language or even plain text so many people prefer it. Some use both saving paredit for Lisp languages and using smartparens elsewhere.

As part of his Productive Emacs series, Arjen Wiersma has a nice video introduction to paredit. It gives you an idea of the basic functionality and what it can do. As Wiersma says, the nice thing about paredit is that it ensures you always maintain a syntactically correct program. It won’t let you do things like get unbalanced brackets or quotation marks. If you’ve written in a Lisp language you know how easy it is to get unbalanced brackets so paredit can be a life saver.

Wiersma’s video is 19 minutes so plan accordingly. If you decide you want to try it—and you should—be prepared for some frustration. I don’t know anyone who just started using it and stuck with it the first time. The real secret, I think, is understanding slurping and barfing. Wiersma’s video covers that important topic so after watching it and perhaps printing out a cheat sheet to help get you going you’ll be ready to try it out. Stick with it. Everyone who has, including me, says they wouldn’t want to live without it.

Posted in General | Tagged | 2 Comments

Using Babel Video

Rainer Köenig has a new video in his OrgMode tutorial series. This time he takes a brief look at using Babel in Org files. The video is a bit limited because, as Köenig admits, he doesn’t have very many use cases for source code in Org files and he doesn’t feel comfortable talking about things he doesn’t use himself.

Still, the video is a useful introduction to Babel and covers everything you need to get going. Köenig demonstrates running shell code and a Graphviz dot file to draw a graph.

The video is just short of 15 minutes so you may have to schedule some time. It’s definitely worth watching, especially if you aren’t familiar with Babel.

Posted in General | Tagged , | 1 Comment

Elfeed

Those of you who have been paying attention know that I’ve been threatening to complete my move to (almost) all-things-in-Emacs by switching to elfeed for my RSS feeds. It doesn’t really have a good iOS solution but it is easy to keep two or more laptops/desktops in sync so there was no reason for me not to give it a try.

I started with the configuration from Mike Zamansky’s first elfeed video and made a couple of small tweaks for my local situation. I also added a bit of Elisp to have elfeed run in a single large window and then restore the previous window configuration when I quit. That’s because I usually have two windows open in Emacs and things are easier with just one when I’m reading my feeds.

I’ve long been an admirer of Chris Wellons and have written about some of his posts before. Elfeed is just what I’d expect from him. It’s beautifully written and reimagines the process in terms of searching rather than a simple list of posts to read. You can search on tags or titles or times to get the exact list of topics you want to see. Take a look at Wellon’s README to get a good overview and watch Zamansky’s three videos on Elfeed to see it in action.

For the time being I haven’t implemented the very nice searching solution that Zamansky shows in the second two videos but I probably will. I decided to get used to Elfeed and get the basics the way I like them first.

I’ve already noticed a change in the way I read the feeds. Before, I used to read everything at once at the end of the day using Feedly in Safari. Now I find myself bringing up elfeed several times during the day and reading a few at a time—usually whatever has come in since my last session. It’s comfortable, mouseless, and built right into Emacs. I really like it.

Posted in General | Tagged | 3 Comments

An Easy Way to Download Your Email in Maildir Format

As you all know, I spent considerable time configuring mbsync to download my email in Maildir format so that I could try out mu4e and move one more function into Emacs. It wasn’t, by far, the hardest thing I’ve ever done but I did spend a lot of time on it and had to beg for help from Irreal readers. It was, when you think of it, a bit of a risk. A lot of effort and research for something I might not like all that much. As it turned out, I like mu4e a lot so it was worth the effort for me but your mileage may vary.

There turns out to be an easier way: just let Thunderbird download your email. The writer of the linked reddit piece sometimes likes to read his email in Thunderbird anyway so using it means

  1. He didn’t have to configure mbsync.
  2. He has only one copy of his email on his machine.

Since I did, in fact, get mbsync configured, I haven’t tried this on the Mac but I don’t see any reason why it wouldn’t work. If you’re not already using Thunderbird it might end up being easier to just install mbsync and configure it. If you do have Thunderbird installed and want to try mu4e, you can do it easily without worrying about getting your email downloaded. If you like mu4e and don’t need Thunderbird anymore, then you can go through the pain of getting mbsync running.

Posted in General | Tagged | Leave a comment