Red Meat Friday: Is Emacs A Small Editor?

I did a double take when I saw this tweet:

As everyone here knows, I’m all in on Emacs but I’ve seldom seen it described as “a small editor.” Emacs is many things but “small” isn’t one of them. I wondered why anyone would described it that way. I followed the link in the tweet and got the answer.

That answer is today’s red meat although for us Emacs true believers it seems more like an obvious truth.

Posted in General | Tagged | Leave a comment

Date Ranges

I may have written about this before but this tweet:

offers a nice animated demonstration of using Org Mode to calculate the time between two date/time stamps. Actually, it’s even better than that because it also tells you how to do it without Org using the Emacs Calendar command.

It’s not one of those things you need often but it’s really handy to have when you do.

Posted in General | Tagged , | Leave a comment

Emacs is a Well-Honed Tool

Eamonn Sullivan has a post that describes Emacs as A Well-Honed Tool. If you’re an Emacs user, your immediate response is probably, “Well, yeah!” but Sullivan’s point is more than just Emacs is a great editor. There is, as he says, a reason he uses an editor that’s almost as old as he is.

Emacs has been around long enough that several generations of users have worked on sanding down the rough edges and making it an extraordinarily useful tool. But, of course, the real story is that you can make Emacs into whatever you want: you can add new functionality or completely rewrite existing functionality because Emacs is written almost entirely in its own extension language.

Sullivan is an interesting case study because he has had two careers: in journalism and as a programmer. That gives him a foot in both Emacs user camps. He has used it as someone with a traditional liberal arts job and as someone with a program development job. That means he has probably explored more of Emacs functionality than most of us working in only one of those environments.

A subplot of the post is that he wrote a bit of code that largely automates the mechanics of making a blog post. The code is, he says, not particularly sophisticated and just bombs out if there’s an error but it was quick to write and solved a problem he was having. He expects that the code will evolve and get better but in the mean time, that problem is solved.

This is the type of thing I—and I’m sure most of you—are always doing: we’re performing some boring, mechanical task for the \(n^{\text{th}}\) time and suddenly realize we could write a bit of Elisp to do it with a couple of keystrokes. We may or may not evolve the code but that boring, mechanical task has been banished from our workflow.

Emacs really is a well-honed tool.

Posted in General | Tagged | Leave a comment

Hardware Microphone Interlock

Here’s a good idea. Apple laptops with the T2 security chip have a hardware interlock that turns off the microphone when the cover is closed. Apple stresses that the interlock is hardware based and can not be disabled by software. The 2020 iPads will also have the feature according to Apple.

That’s not a security panacea, of course, but it does prevent malware from spying on you when the laptop cover is closed. Every laptop manufacturer should implement something like this. I’m sure a simple mechanical or magnetic interlock would do the trick so something like the T2 chip wouldn’t be required.

Posted in General | Tagged | Leave a comment

Using Emacs as a Python IDE

If you follow the Emacs scene, one of the questions you see all the time is how to configure Emacs as a Python IDE. Emacs, of course, offers rudimentary support for Python but that consists mostly of syntax highlighting and indentation. Fortunately, there’s elpy, an Emacs package that brings a more complete Python IDE to Emacs.

Sean Wade Jon Fincher has a nice post that serves as a mini-tutorial on how to install and configure Emacs and elpy to provide an excellent Python development environment. He begins with a short introduction that links to Xah Lee’s instructions for installing Emacs and covers just a little bit about how to use Emacs. He recommends doing Emacs’s built-in tutorial to learn the basics.

After the introduction, Wade walks you through making a minimum configuration. Experienced Emacsers may or may not like his configuration but it is an appropriate for a N00bs who can tweak things to their liking when they get a little more experience.

The meat of the post discusses how to install and use elpy. Read the post for the details but it doesn’t seem very complicated. Then Wade talks about adding things like flycheck, the black code reformatter, integration with Jupyter Notebooks, and, finally, Ipython.

Wade concludes the tutorial with a discussion of support for testing, debugging, and version control. The result is a very nice Python IDE built into Emacs. That can be important because, as Wade says, the average developer will be writing in several computer languages, perhaps using a markup language like Markdown or Org, writing Shell scripts, and probably many other editing chores. That developer can be much more efficient if he uses and masters a single editor for all those tasks rather than depending on bespoke editors for each language or chore.

Even if you use Python only occasionally, it’s worthwhile having a REPL and proper language support so Wade’s post is definitely worth your while.

UPDATE [2020-04-06 Mon 13:53]: Added link to Wade’s post.

UPDATE 2 [2020-04-14 Tue 13:28]: Sacha wrote to say that Wade’s article appears to be a reposting of one by Jon Fincher. A bit later Dan Bader wrote that Sacha is correct and that apparently the site (morioh) is making a habit of such things. If you follow the link that Sacha and Bader provide, you can see that it is, in fact, the same post. How is this right or even legal?

UPDATE 3 [2020-04-14 Tue 15:10]: I’ve removed the link to Wade’s post so as not to reward bad behavior with a link. The post itself is well worth reading so go read Fincher’s original.

Posted in General | Tagged | Leave a comment

Schneier on Zoom Security

The COVID-19 pandemic is having many unexpected consequences. One of those consequences is to bring the Zoom video conferencing platform to the attention of almost everyone. Zoom appears to have the best-in-class video conferencing software as far as video and audio quality go but there are lots of security and privacy issues with it.

It’s tempting to say these problems became known as a result of Zoom being thrust into limelight but the truth is that Zoom’s problems have been known for some time. Its sudden popularity has caused these problems to become widely understood and made things worse by revealing still more problems.

Bruce Schneier has an excellent post that discusses Zoom’s privacy and security problems. It’s astounding that software ostensibly targeted at enterprises could have such sloppy security. Schneier calls it a security and privacy disaster and notes that the New York City school system has banned its use.

The sad thing is there’s no reason for Zoom to be collecting their users’ information. They have a good product that would be successful on its own without shipping user data to Facebook and other dubious activities. They should clean up their act and hire someone who actually understands security, knows better than to run their crypto in Electronic Code Book mode and who understands the meaning of end-to-end encryption.

Before committing to the platform, take a look at Schneier’s post and evaluate if you really need to be or should be on Zoom. More and more organizations are concluding that it’s just not worth it.

Posted in General | Tagged , | Leave a comment

An Annotated Bibliography with Org Mode

Gregory Stein, over at Caches to Caches, has a great post on a novel application of Org Mode. Stein is an academic who reads a lot of papers. It’s important for a researcher to not only read the latest research but to have some means of recalling it. I’ve been writing a lot lately about the Zettelkasten idea. That’s a method for recording ideas and linking them together based on context.

Stein’s post describes an idea that’s not quite a Zettelkasten but has some of the same features. Stein wants a bibliography of the papers he reads along with a short note describing why he thinks the paper is interesting and possibly useful in future research. The parallel with a Zettelkasten is obvious.

It turns out that Orb Babel has a bibtex code block in which you can specify the elements of a bibtex entry. Once you know that, the rest is easy. Stein adds a (sub)heading for each paper that contains his commentary on the paper and then the Babel code block with the paper’s bibliographic information. The commentary can contain \cite references to link this paper to related papers. That gives him the best of two worlds. He has all the information in a single file that’s easy to search using Org or even a simple grep and he can export the bibliographic data to a bibtex file by exporting it with Org tangle.

Take a look at Stein’s post for the details and a sample file entry. He also shows the exported resort so you can see the power of the method. As I said, it’s not quite a Zettelkasten but embraces the same idea: record ideas and link them by context.

Posted in General | Tagged , | Leave a comment

Ten Tips for Getting Started With Emacs

Over at Opensource.com, Seth Kenlon an interesting post on 10 tips for getting started with Emacs. There are a couple of items I disagree with but most of the post is good advice.

His first piece of advice is to start with the GUI. This makes sense for almost everyone. The advantage for the n00b is that you have the menus and mouse to help. I’m always ambivalent about that. On the one hand, the menus do help n00bs discover the shortcuts and get things done when they forget a shortcut. On the other hand, they can become a crutch and a habit. One of the ways that Emacs helps me be more productive is that I can do everything from the keyboard. I never use the mouse even though it’s easy with my MacBook Pro’s trackpad so I’m inclined to tell beginners to jump in and learn the shortcuts, using the mouse only when they get stuck and never for things like selecting text. When I started with Emacs, I made heavy use of the Emacs Cheat Sheet and mostly avoided the menus.

Another assertion that I don’t agree with is that it’s all right to “share.” By that he means that it’s fine to use other editors if they fit a particular task better than Emacs. I’ve been through that before and lots of people disagree but using more than one editor would make me crazy because of muscle memory. Plenty of folks assure me that it’s not a problem for them but I am not one of those people.

If you’re new to Emacs, take a look at Kenlon’s post. It’s full of good advice and suggests an attitude of not worrying too much about “the Emacs way” but just start using it and see what works for you.

Posted in General | Tagged | Leave a comment

New Image on Blog Page

Anyone who’s been around here for more than a day will recognize that Irreal now has an image at the top of the page. That’s because I just got a theme update and now’s there a big empty (framed) spot if there’s no image. That looks terrible so I chose one of the stock images for now. It seemed to me to be sort of Florida-like so I picked it.

Ideally, I’d like to go back to the spare look I had before but I don’t have the time or energy to figure out how to do that right now. So for the time being, enjoy the cheesy sunset.

Posted in Administrivia | Leave a comment

Using Notion as a Zettelkasten

The other day I was checking Ali Abdaal’s You Tube feed for new videos and I happened to see an older video that I’d watched earlier. It was about how Abdaal uses Notion as a resonance calendar. When I first watched it, I thought it was interesting but it was before I had started reading Sönke Ahrens’ book on the idea of a Zettelkasten. What Abdaal is talking about is exactly that: implementing a Zettelkasten with Notion, although he doesn’t use that term.

As I’ve mentioned before, Notion is a nice app but prudent users will avoid it because you lose control of your data. The better solution is to use Org mode, which provides essentially the same functionality albeit without the fancy GUI.

If you’re an Org user and watch Abdaal’s video, you will be struck with how easily the things he’s doing translates almost directly into Org mode. I’ve looked a bit into Org-roam and it appears to ease the linking of ideas—although this can be handled manually in vanilla Org—so, once again, you can implement Abdaal’s procedures in Org and maintain control of your data.

The video is very useful because it mainly discusses how to take an idea and link it to other related ideas based on context. That’s the very essence of the Zettelkasten method and something that much of the literature glosses over. At least for me, seeing examples of how an idea is added and linked to others is very helpful in understanding the Zettelkasten method.

The video is 13 and a half minutes so it’s easy to watch and definitely worth your time if you’re interested in the Zettelkasten method.

Posted in General | Tagged , | Leave a comment