Symlink Copying with Dired

Marcin Borkowski (mbork) has a handy tip concerning something I didn’t know about. If you use dired—as you should—for your file operations and you know that you can use C to copy one or more files. By default, the command, dired-do-copy, copies symlinks by creating another symlink as the target.

Most of the time, that’s probably what you want but not always. It turns out you can make an actual copy of the file by specifying the universal argument. See mbork’s post for post for the details.

Posted in General | Tagged | Leave a comment

Kids and Typewriters

I’m not sure why I’m writing about this other than that I find it really annoying and can’t get it out of my mind. It sort of fits into the new Luddites category, which automatically makes it irksome but there’s also the matter of it being completely pointless and stupid.

The “thing” in question is an article over at Lifehacker that urges parents to buy their kids a typewriter. That seems innocent enough until we get to the reasons. For example:

  • You don’t have to walk to the printer to get the results; it’s right there.
  • Kids will learn to accept mistakes that are difficult to correct.
  • Typewriters don’t have screens and that’s good (somehow).
  • “Real” letters are more fun to receive.

All of these so called reasons have trivial rejoinders that are so obvious there’s no point in listing them but there are two points worth mentioning:

  1. Notice how they embrace the New Luddite theme of “the old way is best; new-fangled ideas should be eschewed.”
  2. They are, at base, not serious—just silly, really.

If you substitute rotary phone or abacus for typewriter the arguments make just as much sense. As I’ve said before, I’m perfectly happy for these people to go back to the farm, grow their own food, and carry water up from the well every morning. I just wish they’d leave the rest of us alone to get on with our lives.

Posted in General | Tagged | Leave a comment

Emacs 27.2 Pretest 2 Is Out

Eli Zartetskii announced on the emacs-devel list that the second pretest for Emacs 27.2 is ready. The announcement tells you where to get the tarballs if you prefer that method to using the git repository.

As always, show your thanks to Eli and the other developers by testing the release if you can.

Posted in General | Tagged | Leave a comment

Read Meat Friday: The Editor Wars

Yes, yes. We know it’s not quite true but it feels emotionally right. Or at least, satisfying.

Posted in General | Tagged , | Leave a comment

Reading HTML Emails with Mu4e

Yesterday, in my post about sending HTML emails with mu4e, I noted that being able to send HTML emails is only half the problem; probably the easiest half. The hard part is being able to read a properly rendered email form within mu4e. Eww sometimes works—sort of—but some emails (Amazon is a notable guilty party here) are simply unreadable without a trip to the browser. It’s not that hard to pop up a browser tab and then delete it when you’re done but that’s extra work and violates the stay-in-Emacs rule that many of us try to live by.

If you’re an X user, RichieHHam has a possible answer for you. He has a reddit post that describes how to use XWidgets to read emails from within Emacs. Sadly, if you’re a Mac user like me, this solution is not available to you—at least not easily.

Being a Mac user also means I can’t try this out so I have no idea how well it works. If you’re a Linux user and try it out, leave a comment to let other Irreal readers running Linux know.

Afterword
After I wrote this, I nosed around the Internet a bit and discovered that there are some XWidget solutions for macOS but I have no idea if they would work with RichieHHam’s HTML email setup. Really, the best solution is for Emacs to accurately render HTML natively but that’s not trivial.

Posted in General | Tagged | Leave a comment

Sending HTML Mail With Mu4e

Like all right thinking people, I abhor HTML emails but that’s a ship that sailed long ago and there’s not much choice other than grudging acceptance. The virtuous can, of course, continue to send plain text but sometimes your content or recipient really does need HTML. And truth be told, I often wish I could add some simple formatting like italics or bold.

David Wilson over at the System Crafters YouTube Channel has an excellent video on sending HTML with mu4e. The TL;DR is that you use org-mime to create a multipart email with plain text and HTML versions of your message. That’s pretty nice but the real win is using Org-mode to compose your emails. That lets you use the usual markup for things like bold and italics, add headers and links and all the other nice things that Org offers. Wilson’s video explains how to do all this and a couple of other things as well.

Sadly, this addresses only half the problem. The other side is rendering HTML messages that you receive. You’ve got eww but that often doesn’t work satisfactorily with emails. You can ask mu4e to display a message in your browser but then you’re leaving Emacs.

This is a good video and definitely worth watching. It runs 29 minutes, 12 seconds so you’ll have to schedule some time but if you’re a mu4e user you should definitely spend that time.

Posted in General | Tagged , | Leave a comment

Modernizing Emacs (Again)

I cry out in despair, “For the love of Cthulhu, not again.” And yet my pleas go unanswered. LWN has an article on the latest iteration of “Hey kids! Let’s make Emacs more modern.” that keeps reappearing on the Emacs-devel list like a stubborn rash that won’t go away. The suggestions are mostly the usual silliness like making the default theme be dark mode, and, of course, making CUA mode the default—current users be damned.

I’ve got some objections. One of the complaints is that themes are too hard for n00bs to figure out. I’m not sure what happens these days but when I first started using Emacs I recall being asked if I wanted what we now call a light or dark theme. I chose the light theme and all the other syntax highlighting colors were chosen for me and seemed perfectly fine. Later, when I had a bit more experience and the white background began bothering my eyes, I set background to a light tan and made the cursor red. That’s one line for the background and one for the cursor. Installing the theme of your choice is even easier. If, at that point, I had wanted a more specialized theme, I would have had no problem installing it. Indeed, I did install Solarized for about 38 seconds, which was all it took me to decide I didn’t like it. None of this is very hard.

This crystallizes my main objection to all this. To my mind, if you don’t have the commitment to figure out how to install a theme of your liking—again, a fairly trivial task—then, really, Emacs is probably not for you. Emacs is all about providing you with a highly customized text processing environment. You start with something very basic and mold it to fit your needs. If you’re not willing to learn how to do that, what’s the point?

And really, I think chasing these “new users” is mostly a fool’s errand. The new users who are serious developers will find Emacs or Vim or another editor that meets their needs on their own. The new users who are today’s equivalent of the web site developers of yore never will. They’re all about pushing a button and having a bunch of boiler plate inserted for them. They’ll never adopt Emacs.

Every time I write something like that, I get accused of being mean but I don’t mean to be. In this vein, another suggestion was to package some videos giving n00bs an overview. Here’s what Stefan Monnier, a former lead Emacs maintainer, had to say about that. See? I’m not that mean.

Posted in General | Tagged | Leave a comment

Editing Anki Cards with Org Mode

I have a post in the queue that discusses spaced repetition and how to use Anki to realize it. Emacs, of course, has org-drill, which by all reports is an excellent implementation of spaced repetition but suffers from not being portable to smart phones and iPads. Still, who wants to have to use Anki’s editor for making cards when we Emacsers hate to do any text editing outside of our favorite editor.

Fortunately, Emacs has us covered as usual. There’s a package called anki-editor that lets us compose Anki flash cards in Org mode and import then into Anki. I’ve written about this before but Rohit Goswami has a recent post that considers using anki-editor with Doom.

Using Anki with anki-editor seems to me to be the best of two worlds. On the one hand, creating Anki cards can be accomplished in Emacs, which we consider the ideal—or, perhaps, the only acceptable—environment for performing text editing tasks. On the other hand, Anki is portable to and syncs between our laptops and our mobile devices. Most of us—modulo the pandemic—spend a lot of time traveling on buses, trains, or taxis or standing in line somewhere like the DMV, the bank, or the grocery store. That’s the perfect time to pull up your Anki deck and do a little spaced repetition.

The question remains as to why you should bother. I’ll cover that in my upcoming post on Anki and augmenting your long-term memory.

Posted in General | Tagged , | Leave a comment

Using Emacs & Org in College (Programming) Assignments

If you’re an experienced Emacser, the idea of using Emacs everywhere—including for school assignments—is second nature. Of course, not everyone is an experienced user. Some, like Seshal Jain, discover Emacs in the course of their studies and evolve their workflows as they go along. Jain has a useful post on how he does his programming lab assignments with Emacs and Org-mode.

He starts with explaining his pre-Emacs workflow:

  1. Write the code and explanation for the assignment.
  2. Run the program in a terminal and take a screen shot of the results.
  3. Paste the screen shot into some sort of word processor.
  4. Send the resulting PDF to the professor.

Org-mode/Babel combines all this into a single file and the whole process is run right from Emacs. This type of application is ideal for a Literate Programming approach and Org allows you to insert the results right in document and then export the file to a PDF.

Jain also shows how to add syntax highlighting to the PDF using minted and the Python Pygments package. If you’re new to Emacs and have to write up programming lab results, you should take a look at Jain’s post. It’s pretty much a step-by-step guide to setting up an Org environment that makes writing your reports as frictionless as possible.

Posted in General, Programming | Tagged , | Leave a comment

The New Luddites at Their Most Malignant

I didn’t have a topic in mind for today’s post so I looked through my list of potential blog topics. It turns out that there were lots of pending topics but seeing this Substack article from last October rekindled the anger I felt the first time I read it. Or perhaps disgust is a better word.

The gist of the article is that colonizing space is a fantasy whose real purpose is to maintain the status quo. Notice how it combines the usual New Luddite dislike of any technical progress and the infantile politics usually found in the more unhinged corners of Twitter. Oren Weisfeld says that space is not just a bad idea or waste of resources but that “It’s dangerous to think humans have a destiny outside Earth.”

The truth, of course, is just the opposite. That for humanity to survive, we must get off the earth has been said so often that it’s become trite but it’s still true. Most people, Weisfeld admits, agree with this and support the space program. But, of course, to the New Luddites these people are deluded and don’t actually understand the issues. He believes that spending any resources on things that he doesn’t care about is not only a waste but immoral. Apparently the three quarters of the population that have other priorities don’t know what’s good for them and shouldn’t have a say.

Posted in General | Tagged | Leave a comment