Zamansky 33: Projectile and Dumb Jump

Mike Zamansky has video number 33 up in his Using Emacs series. This video discusses Projectile and dumb-jump. As most of you probably know, Projectile is Bozhidar Batsov’s project interaction package for Emacs. It provides handy features for using Emacs at the project level. I’ve always thought of it as a tool for developers working with large projects who need a way of navigating around the project files easily. Zamansky’s video shows that it’s also appropriate for people who have a number of groups of related files that they wish to deal with as a whole even if they aren’t really projects. Even if you aren’t dealing, strictly speaking, with “projects,” you may find it handy so you should take a look at the video to see if it will work for you.

The other package that Zamansky discusses is dumb-jump. It performs the same basic function has the various TAGS systems but without having to generate or maintain a TAGS file. It’s a bit slower because it uses The Silver Searcher, ripgrep, or grep to locate the desired targets. From Zamansky’s video, it appears to work pretty quickly with The Silver Server.

I’m pretty impressed with the idea of dumb-jump and will probably give it a try. Early on in my career I developed a dislike for TAGS systems because it was such a pain to maintain the TAGS files. That’s probably easier now but my prejudice prevails. Dumb-jump seems like a nice compromise. It supports all the languages that I use regularly and there’s virtually no configuration after you include the use-package in your init.el.

The video is just short of 11 and a half minutes so you should easily be able to find time to watch it. If you aren’t familiar with Projectile and dumb-jump, it’s definitely worth your while.

Posted in General | Tagged | Leave a comment

The Value of Source Code in Emacs

Arun Isaac makes a nice point. Most of us support open source and insist on our right to have source code available but we hardly ever look at that source. Except for Emacs. Isaac observes that when the documentation is missing or ambiguous, he simply follows the link to the source to see what’s really going on.

Of course, you have to know some Elisp but the point is that the source is instantly available without leaving Emacs. You can check it and then return to your original buffer with your new knowledge. It’s life changing in a way that even the best of most open source software is not.

As I’ve said before, it’s because Emacs (sort of) recapitulates the Lisp Machines of yore. There are no secrets and everything is available in your chosen environment. This, more than anything, is why I am moving as much as possible into Emacs.

Posted in General | Tagged | 1 Comment

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