Magit 3.0 Released

Jonas Bernoulli has just released Magit 3.0. It doesn’t appear to have reached MELPA yet but will doubtless appear shortly. The new release contains over 1,200 commits and comes two and a half years after the last feature release.

Bernoulli’s announcement lists the major user-visible changes but you can also check out the Release Notes if you want the details. The main changes are to the menus, integration of spin-off packages such as Transient, and a relaxation of assumptions about the names of repositories and branches. Again, see Bernoulli’s announcement for the details.

Just about everybody agrees that Magit is one of Emacs’ killer apps. Along with Org-mode, one often sees it cited as the reason for moving to Emacs. If you believe in supporting free/open source authors, Bernoulli is certainly deserving of that support.

Posted in General | Tagged | Leave a comment

Sudo

Anyone who works in a Unix or Linux environment is familiar with the sudo command. Sudo allows the user to execute a command as root. That’s sometimes necessary even for the most basic users who aren’t operating on a locked down machine controlled by a system admin. Back when I was learning Unix, everyone just used su to become root but security concerns lead to the use of sudo instead.

The problem with sudo is that it’s good for one command only. That’s great if all you want to do edit a system file or copy a file to one of the system directories but it gets to be a pain when your task involves several commands. Very often, you really do want a root shell.

It turns out that the sudo command can do that too. If you invoke it with the i or s flags, it will give you a root shell. There’s a subtle but significant difference between the two flags. Fortunately, Derrik Diener over at maketecheasier explains all this in his article The Differences between Su, Sudo Su, Sudo -s and Sudo -i. It covers everything you need to know but the TL;DR is that you usually want sudo -i although sudo -s is also useful.

Apple doesn’t reveal the root password on Macs but it’s easy to reset using sudo. When I got my first Mac, I did that but now I don’t bother; sudo does everything I need. By using the i or s flag, I can also get a root shell when I need one. If you’re a sudo user, be sure to take a look at Diener’s post.

Posted in General | Tagged , | Leave a comment

Mechanical Keyboards

I’m a huge fan of mechanical keyboards. Back in the old days that meant the IBM Model M and its latter day incarnation from Unicomp. I’ve had both—although I foolishly left my Model M behind at my last job—and there’s nothing more satisfying than their solid, tactile, clicky feel as you type. Of course, the Model M and its Unicomp offspring are pretty noisy with their clickity-clack sound but that can also be satisfying (although perhaps not to your colleagues).

These days, there’s an embarrassment of riches. The point of mechanical keyboards is, of course, their key switches and modern mechanical keyboards usually come with a choice of switch types. You can get noisy, clicky ones like on the Model M or quiet clicky ones, or a softer feeling switch without the tactile feedback. The problem now is not getting a mechanical keyboard but deciding which one to get.

Wirecutter has an excellent review of mechanical keyboards with their recommendations on which to choose. It’s a long and comprehensive review. It doesn’t cover every choice, of course, and although it mentions wireless mechanical keyboards it doesn’t have much to say about them on the grounds that they’re not yet as good as their wired brethren.

Ali Abdaal also has an interesting video in which he compares several mechanical keyboards in terms of which allow him to type the fastest. Ironically, he gets his best results with the standard, nonmechanical Apple keyboard but he considers a different selection of keyboards from Wirecutter so its a useful companion to the Wirecutter article.

If you’re in a mechanical keyboard, these are two great resources. If you’ve never typed on one, you should give it a try. They really make typing much more enjoyable.

Posted in General | Tagged | Leave a comment

Two Tramp Tricks

Over at TAONAW JTR has a nice post on a couple of tramp tricks. They’re pretty simple and don’t require any heavy duty configuration or setup. The first is to set dired-dwim-target to t. The variable is a bit more configurable but just setting it to t will change the default dired target (for copy and rename commands) to the directory of another open dired window, if there is one. This is particularly useful if the other dired window is pointing to a remote machine. It’s a fast way of copying a list of files from one machine to another.

The second tip is very simple but, according to JTR, can make transferring files from one machine to another with tramp much faster. The tip is to use scp rather than ssh when connecting to a remote machine. That’s simple a matter of connecting to /scp:user@machine:/path rather than /ssh:user@machine:/path. Tramp is smart enough to connect over ssh and do the right thing if your path points to a directory.

Take a look at JTR’s post for a few more details and for some further advice on bookmarking remote directories. It’s a short post so it’s easy and quick to read.

Posted in General | Tagged | Leave a comment

Science and Politics

Via John Cook, we have this thought for the day from John Barry:

We can all agree that politics is a necessity for human interaction but it can also be a cancer that corrupts everything it comes in contact with. The trick is to keep it confined in its own domain and not let it infect domains like science where it doesn’t belong. Sadly, it’s a lesson we seem to have forgotten.

Posted in General | Leave a comment

Org 9.4.6 Released

Bastien has announced that Org-mode 9.4.6 has been released. It’s a bug release and is planned to be the last release before version 9.5. The easiest way to get it is from Org ELPA.

Posted in General | Tagged , | Leave a comment

Tools for Your Development Environment

Chris Rose over at offby1.net has an interesting post on tools to enhance development environments. Other than the fact that one of his recommendations is Doom Emacs, the post isn’t really Emacs-centric. Rather, he considers a series of standalone tools that can lubricate your workflow.

His suggestions are:

  • Chezmoi to securely handle your configurations across multiple machines
  • Doom Emacs as a comfortable, complete, and hackable Emacs configuration
  • Direnv a utility to dynamically load environment variables on a current directory basis
  • Starship provides fast, configurable prompts for any shell
  • Asdf to manage multiple runtimes (Node.js, Ruby, Python, …) with a single tool

None of these—other than Doom Emacs, perhaps—are going to change your life but they all help reduce friction in your workflow and they all seem lightweight (again, other than Doom Emacs) so they’re a win. Rose’s post is short so you’ve nothing to lose by spending a couple of minutes with it. Perhaps one of the tools he discusses will appeal to you.

Posted in General | Leave a comment

Emacs and Web Browsing

I’ve written many times that almost all my computer time is spent in Emacs and my browser (Safari). What all us everything-in-Emacs devotees want is to do away with using an external browser. We yak yak yak about eww but in our secret hearts we know that it can’t really replace a browser. Yes, you can learn to live with its limitations but it really can’t replace a full-fledged browser.

While looking around for today’s subject matter, I came across this Howard Abrams post from last December. In it, he describes his method for dealing with browsers. He has the special requirement of needing a different browser for work than he does for personal use. Additionally, he wants to use eww when he can.

It turns out that it’s fairly easy to automate this. By “automate” I mean that he can provide a list of Websites for which he wants to use a particular browser and default to eww for sites not in the list. Most of this is built in but he does have to provide a function for each browser he wants to use.

Take a look at Abrams post for the details. Most of us don’t need to use multiple browsers, of course, but Abrams post shows how it’s possible to adapt Emacs to your workflow and if not solve, at least ameliorate the browser situation.

Posted in General | Tagged | Leave a comment

Ivy To Selectrum

I’ve written many times how important the Ivy/Counsel/Swiper package is to my workflow. Other than Org-mode, it is the most important package in my Emacs panoply. Even so, it does so much that I don’t make use of all its capabilities.

I was, therefore, very interested in a post by Jeremy Friesen in which he describes his move from Ivy/Counsel/Swiper to Selectrum. Friesen has been a happy Ivy/Counsel/Swiper user since he became an Emacs user a year ago but decided to switch to Selectrum. His reason for doing so—as far as I can tell—is that Swiper et al. have grown organically, added some special cases, and therefore become more complicated at the source level. Selectrum, on the other hand, tries to adhere to the Emacs API and is therefore simpler.

I have to admit that I don’t really understand the objection. Unless you’re planning on hacking on the package, its complexity is a minor matter. Yes, complexity unchecked can lead to maintenance problems in the long term but I’d pretty sure we’re nowhere near that point now. In fact, every time I see a problem reported on, say, reddit, the first comment is usually from abo-abo with a solution or an announcement that he’s already pushed a patch.

Still, I understand that some want a simpler solution that doesn’t try to do so many things. If that describes you, give selectrum a try. If you like having unused capabilities in reserve for the day that you do need them, maybe you should stick with Ivy/Counsel/Swiper.

Posted in General | Tagged | Leave a comment

Protesilaos Stavrou on Notmuch

As all of you know by now, I’m a big fan of mu/mu4e for handling email. For me, one of its major attractions is that it runs in Emacs. For those of us who prefer to do as much as possible in Emacs, there are two popular email options: mu4e and notmuch for Emacs.

Protesilaos Stavrou has a really good demonstration of using the notmuch email client. This is the best presentation of notmuch functionality that I’ve seen. Notmuch is actually a command line utility that indexes and searches your email repository (much like mu) but it also has an Emacs interface that acts as a mail client in Emacs (like mu4e).

The big difference between notmuch and mu4e is that notmuch depends heavily on tags while mu4e doesn’t offer much support for tags and relies on its powerful search capabilities instead. Stavrou shows how to leverage the power of tags to get various views of your email. This works because the tags are essentially bits of metadata added to the messages so you can characterize a message as finely as you like by adding appropriate tags. The problem with this is that assigning appropriate tags is much like deciding what directory to store a message in. With mu4e, I can just throw everything into a single directory and use search to find a target message. On the other hand, tags can narrow a search more quickly. Either approach is fine and neither seems intrinsically better.

I even learned a useful trick from the video. It turns out that Ctrl+c Ctrl+z
while in message-mode will delete everything from point to the signature line. That’s really useful when responding to an email and since it’s a message-mode feature, it works in mu4e too.

The video is just short of 24 and a half minutes so you’ll need to schedule time. Like all of Stavrou’s videos, it’s worth the time.

Posted in General | Tagged | Leave a comment