Always Encrypt

Here’s a piece of essential advice

If you follow the links, you end up at this CNN Tech story about Evernote changing their terms of service to allow their employees to read your notes (all in the service of improving Evernote, of course).

I love how some reporter keeps his interview notes with anonymous sources in Evernote and is now all concerned about the consequences. WHAT DID YOU THINK WAS GOING TO HAPPEN? If you’re going to store your data on a public service, it’s up to you and no one else to make sure it’s secure. Almost always this means encrypting it.

I’ve been harping on this since the days of the phony Dropbox “scandal.” See this post for links to those posts if you’re interested. Evernote, to their credit, has taken user complaints to heart and backed off their plans but this in no way excuses you from your responsibility safeguard your data. Evernote could change their mind or get sold and you’re back to having the same problem. And, of course, it’s not just Evernote. It’s every server in the cloud that you don’t control and if you really want to be safe, even the ones you do control.

Posted in General | Tagged | Leave a comment

Emacs Regular Expressions

Jamie Zawinski notwithstanding, I find regular expressions extraordinarily powerful and useful. Most of us in software engineering use them daily and almost all editors support them. One of the complaints I hear all the time is that Emacs regular expressions are not Perl compatible and therefore hard to learn and use or something.

They are (slightly) different from Perl’s implementation but guess what. Perl regular expressions are different from the original grep / egrep flavors as well and yet we all somehow learned to use Perl’s version. Probably the difference that causes the most problems is parentheses. In most regular expression systems, parentheses are used for grouping and a literal parenthesis must be escaped as \( or \). Emacs inverts this usage because parentheses are so common in Lisp. For me, the most annoying issue is having to use things like [[:digit:]] instead of \d.

In any event, Xah Lee has come to the rescue with his recently updated Emacs Regex Tutorial. He points out the differences and how to deal with Emacs specific issues such as case folding. It’s a short tutorial and well worth taking the time to read.

Posted in General | Tagged | 5 Comments

Org Mode 9.0.2

Another Org update is available. It’s already on Melpa if that’s how use handle upgrades.

Posted in General | Tagged , | Leave a comment

Maintenance Window

Starting at 0900 EST this morning, Irreal’s hosting provider will be upgrading equipment so access may be intermittent. The provider expects that everything will be back to normal within 24 hours.

Posted in Administrivia | Tagged | Leave a comment

Resolving Merge Conflicts with magit-ediff

A while back I was whining about never remembering how to resolve a merge conflict and took note of thapakazi’s recommendation to use smerge. In the comments, Irreal regular Phil strongly urged me to get comfortable with ediff and use that. Phil always has good advice so I resolved to do that but life, as they say, intervened and I haven’t been as conscientious as I should be about reading the ediff manual.

Today I came across a post by Leonardo Etcheverry over at Coderwall that has a short and useful tutorial on using magit-ediff to resolve merge conflicts. As Phil said, there’s really not much to remember and using it would probably help me learn to use ediff for other tasks as well. Unless you have established muscle memory for dealing with merge conflicts, you should take a look at Etcheverry’s post.

Posted in General | Tagged , | Leave a comment

Another Zotero Workflow

The other day, I wrote about Michael Behr’s scientific writing workflow that is centered around Zotero, Emacs, and Org mode. Here’s another example of a Zotero workflow, this time from Nick Judd.

Like Behr, Judd collects and manages reference papers with Zotero. Unlike Behr, he prefers to write his own papers in Markdown and use Pandoc to export the result to a PDF through \(\LaTeX\) rather than use Org mode. He doesn’t explain his choice—he doesn’t even mention Org—but his workflow seems to work well for him and, of course, Markdown/Pandoc is a more universal solution than Org mode.

If Markdown makes more sense for you, be sure to take a look Judd’s post to see how he ties everything together. He has detailed directions for getting everything installed and configured. Like Behr, he uses the Emacs package Zotxt to interact with Zotero from within Emacs. And if you haven’t seen Muad Abd El Hay’s comment to my Behr post, take a look at that too. Hay describes a slightly different Zotero workflow that uses John Kitchin’s org-ref package to handle the citations. It looks like an excellent solution.

Posted in General | Tagged | Leave a comment

Running Multiple Emacs Servers

Tycho Garen has an interesting use case. Because he uses a single laptop to work on many projects, he wanted a way to have separate Emacs instances so that his buffers don’t get mixed up between projects. That’s easy enough to do by simply invoking multiple Emacs instances but then if his X-Windows dies he loses everything. As Sacha told us, the way to avoid that is to run Emacs in daemon mode. But how can you run multiple Emacs instances in daemon mode?

Garen has the answer. His solution involves having emacsclient connect to the server with TCP. Follow the link for the details. One of the commenters points out that this can be a security problem if external users can reach the socket. Stefan Monnier replied that there’s a secret key in the server file so the security problem isn’t as bad as it sounds but in any event you can still use local Unix sockets by specifying --socket-name rather than --server-file as an option to emacsclient. This is explained (sort of) in the emacsclient options section of the Emacs manual.

Garen shows another nice trick in his post. I often see people starting the Emacs daemon at boot time by messing with systemd or whatever their system uses to control the boot process. Garen simply makes use of the fact that crontab has a @reboot “time” that will perform the action when the system boots. That solves the problem nicely and easily. Again, see his post for the details.

Most of us probably won’t have occasion to need multiple Emacs instances but it’s nice to know how to do it in case the need does arise.

Posted in General | Tagged | 1 Comment

Extreme Buffers

If you tend to obsess over the number of open Emacs buffers, worrying about performance, here’s some good news

I’ve never come close to that many buffers and I don’t know what his machine configuration is like but you have to admit that that’s pretty impressive.

Posted in General | Tagged | 1 Comment

List of Emacs Configurations

When I first started using Emacs, one of the ways I learned about useful configuration settings and emacs-lisp was to read other people’s emacs configurations. Oddly, I’m still reading them today. When I read an expert’s configuration, I almost always learn something new and useful.

It’s easy to find configurations with a simple DuckDuckGo (or Google, if you must) search but caisah has curated a list of nice emacs configurations. You’ll recognize many of the people these configurations belongs to (Sacha Chua, Magnar Sveen, John Wiegley and Oleh Krehel to name just four) so you can be sure of learning some useful configuration settings and elisp tricks by reading them.

Besides the opportunity to learn some configuration items worth stealing, I find reading the configurations and seeing how other people have solved their editing problems enjoyable even if I don’t need the particular feature under discussion for my own workflow. If you feel the same way, bookmark caisah’s list and use it to check out a configuration or two when you have a few minutes.

Posted in General | Tagged | 1 Comment

Linus on XML

It’s Friday and I don’t have anything very interesting so here’s a troll instead.

Posted in General | Tagged | Leave a comment