What Could Go Wrong?

I feel like that guy in a toga and long white beard parading around with a “Repent” sign. I know I have as much chance of changing any minds as the repent guy does but I can’t help myself. If you’re using Google Drive, cut it out right now. If you don’t you’ll be sorry.

Google is, proudly no doubt, announcing a plan to scan Google Drive documents for objectional material and restrict or delete any they find. If, as you read the announcement, it seems reasonable to you, there are some questions you should be asking: First, what, exactly, constitutes “abuse” or violation of the “terms of service”? Is it possible that this would include having content that Google considers “misinformation”? If so, that’s a bit worrisome because, as one example, Google spent a whole year censoring as misinformation any content suggesting that COVID-19 had its genesis in a lab leak until, suddenly, that was an approved idea after all.

Let’s say you’re a recognized researcher with impeccable credentials in some scientific discipline. Do you really want a 25 year old liberal arts major judging the truth or value of your content? Because that’s exactly what you’re going to get if you try to share your research with Google documents.

Second, notice how proactive the plan is. It’s not merely, “If someone complains about some document, we will investigate and…”, it’s “we’re going to go looking for things to censor.” Is this an organization you want to entrust important work to? If this doesn’t bother and worry you then you’re beyond my or anyone else’s help.

You can expect to hear (even more) stories about serious, levelheaded people having their documents locked or deleted for some imagined affront against the commonweal. The chances are that if you wait 6 months, the censored content will be conventional wisdom.

Don’t do this to yourself. Find another way of sharing your documents.

Posted in General | Tagged | Leave a comment

Five Emacs Features to Love

Seth Kenlon of Red Hat has an interesting article on five reasons that he love Emacs. Of course, all of us Emacs users have lots of reasons that we love our editor, but Kenlon’s articles considers how those features are or might be realized in other editors.

His five beloved features, along with some of my commentary, are:

Packages and their management
Emacs, of course has an excellent package system and other package managers for those looking for something else. Packages are one of the major features allowing Emacs to grow seamlessly and continuously.
Integrations
Kenlon wants his editor to feel like part of the operating system. He wants things like ~ to refer to his home directory in the file system rather than the editor’s notion of where you’re documents are kept.
Tramp
The idea that editing files on remote machines should be transparent is something that Emacs and Tramp do very well. Tramp is, in my opinion, one of the underappreciated parts of Emacs.
Syntax and linting help
As Kenlon says, almost every editor supports some sort of syntax highlighting but Emacs has the notion of modes that customize the editing experience for particular languages or workflows. Some editors are ahead of Emacs here by offering better support for LSP and the like but Emacs is catching up.
Keyboard shortcuts
All editors support some sort of keyboard shortcuts even when they are designed to be menu/mouse driven but Emacs (and Vim) push this a bit further by providing a keyboard-centric environment that doesn’t need the mouse or menus at all. Many Emcees eschew the use of the mouse completely when they’re in Emacs.

Most other editors don’t support these features very well. Various editors can do some of the things on the list but many times their realization is a pale shadow to what Emacs provides. Certainly, no other editor does them as well and as seamlessly as Emacs1.

UPDATE [2021-12-19 Sun 12:18]: Added link to article.

Footnotes:

1

I realize this is perilously close to Red Meat Friday material but I still think it’s mostly true.

Posted in General | Tagged | Leave a comment

Emacs and Siri Shortcuts

MacOS Shortcuts are a recent addition to Apple’s various operating systems that provides an easy way to automate various workflows. You can tap on the shortcut or even ask Siri to run it. It’s an interesting idea but I haven’t learned how to use it. That’s probably because I tend to think of Emacs as my first level OS and am accustomed to handling automation and workflow through it rather than at the macOS level. Still, macOS has a wealth of useful apps and it’s nice to have a way of automating their use.

Dan Petrov has an interesting post about a package he wrote that integrates Emacs and shortcuts. It allows you to run or edit your shortcuts from the comfort of Emacs. Clearly the program is serving a small niche: the intersection of (diehard) Emacs and macOS users but it does serve as another example of how you can bend Emacs to do whatever you need to support your workflow.

If you fall into that intersection of Emacs and Mac users, take a look at Petrov’s post. It may inspire you to learn more about shortcuts and what they can do for you. And did I mention you can interact with them without leaving the comfort of Emacs?

Posted in General | Tagged | Leave a comment

Five Hacks for Org Roam

David Wilson of the System Crafters Channel has a new video in his Build a Second Brain playlist. The serious is about Org-roam, and is, as I’ve said before, the best introduction to and guide for setting up Org-roam that I’ve seen. If you’re interested in integrating Org-roam into your workflow, you should definitely take a look at the play list. There’s just four videos in the series and the total play time is under 2 hours so it’s an easy investment to make.

The latest video is about 5 small hacks Wilson made to Org-roam to better fit his workflow. The video notes and all the code are available here. My understanding of Org-roam is that it’s an Emacs based implementation of Roam Research, which, in turn, is an implementation of the Zettelkasten method. The method was developed by Niklas Luhmann a German sociologist who used it to write over 500 papers and 70 books. The basic idea was to write a single thought, piece of knowledge, or idea on a slip of paper and link it to related ideas with a complicated indexing scheme. You can read all about the method in this book about it.

The idea of Zettelkasten described in the previous paragraph has been pushed by Wilson and others to be a way of keeping track of all their notes including things like TODOs, daily diaries, and other information not usually associated with the Zettelkasten method. All but the first of Wilson’s five hacks are ways to make this extended use of Org-roam easier and more transparent.

It’s a nice video with five really good ideas. If you’re interested in Org-roam, it’s definitely worth your time. The video is 29 minutes, 44 seconds long so you’ll need to set some time aside.

Posted in General | Tagged , | Leave a comment

Deleting Garbage Files

John D. Cook who, among other things, publishes the TeX Tips Twitter feed, is an Emacs user and has a useful tip for cleaning up “garbage files”. Garbage files are intermediate files that can easily be regenerated. Examples are the .log and .aux files generated by TeX and LaTeX.

The secret is to type % & in Dired. It will mark the garbage files for deletion that can subsequently be deleted by typing x. This being Emacs, what constitutes a “garbage file” is, of course, configurable. The % & invokes dired-flag-garbage-files which flags files that match the regular expression in dired-garbage-files-regexp.

I vaguely remember this and I think I even wrote about it some time in the past. The problem is that if you don’t use it a lot, it’s hard to rediscover. It is, in fact, on the Dired Reference Card but the explanation is “flag various intermediate files”, which is technically correct but doesn’t suggest what it’s really used for.

In any event, it’s good to be reminded of it especially if you use LaTeX or some other application that generates intermediate files that you don’t want to save. It’s also another reason to learn and use Dired if you aren’t already.

Posted in General | Tagged | Leave a comment

Real Crosswords

I like crossword puzzles and when I’m on a roll will do 3 to 5 a day. But being an American, I’m a crossword sissy. American crossword clues are mostly a synonym or direct pointer to the target word. About as clever as it ever gets is a clue like “leaves home”1.

The British, however, despite their egregious over spacing of the em-dash, are not crossword sissies. Their crossword clues do everything they can to be obscure. They make “leaves home” feel like a gimme. I was vaguely aware of the difference between American and British crosswords but had no idea about how large that difference is until someone posted a link to this 2019 reprint of a 1968 New York Magazine article on how to do a real crossword. They really are a different species.

The article gives examples of typical clues and their answers. As it turns out, the clues, themselves, have clues that tell the solver what type of clue it is. Some are anagrams: “Stares at torn pages” is an example. The torn is a (sub) clue that the answer is an anagram of “pages” meaning “stares at” so the answer is “gapes”.

According to the article, there are seven types of clues:

  1. Anagrams
  2. Multiple meanings
  3. Reversals
  4. Charades
  5. Container and contents
  6. Puns
  7. Hidden

An explanation of the various clue types is too involved for a short blog post but if you have an interest in crosswords or are just curious, take a look at the article. In the meantime, I’ll think I’ll stick to American crosswords. At least they give you a fighting chance.

Footnotes:

1

Tree

Posted in General | Tagged | Leave a comment

Booster Shots and Other Reasons for Not Doing Any Work

Last Friday I got my COVID-19 booster shot. Here in Tampa, at least, that was easy. You can get them anywhere with an even tenuous link to the healthcare industry. As happened with my second shot, I woke up the next day completely wiped out and feeling vaguely feverish, although I didn’t actually have a fever.

I managed to summon enough energy to publish my prewritten Saturday post but then went back to sleep for most of the day. I feel better today although still a bit weak perhaps because I didn’t eat anything on Saturday.

In any event, I didn’t write anything for today and I just didn’t feel motivated enough to research a new subject so you’re getting this instead. I’m going to try to get something written for tomorrow so things should be back to normal on Monday.

Posted in Blogging | Tagged , | Leave a comment

Native Compilation in Emacs

Andrea Corallo gave an interesting talk at EmacsConf 2021 on his Emacs Lisp native compilation project. For those who don’t know, the native compilation project provides a compiler that converts Emacs Lisp into native code for the host machine. The idea is to enable the elimination of much of the Emacs C code in favor of Elisp. Native compilation will be officially released with Emacs 28, which is currently at the Pretest 1 phase. That means that native compilation will soon be available and supported for anyone who wants it.

Corallo’s implementation is a tour de force. His idea was to convert the Elisp byte code into IR for the GCC. He started off with a straightforward translation from the byte code to IR but the Elisp virtual machine is stack based whereas modern CPUs are register based. That means that the naive approach didn’t realize the performance increase you’d expect.

The current implementation has several passes to translate and optimize Elisp byte code into GCC IR code that GCC can also optimize and use to generate efficient machine code. Corallo’s talk takes us through the compilation process and explains the problems he encountered.

I found that it was easier to view the video on Toobnix because I could make it full screen. The video itself is 39 minutes 8 seconds long so you will need to set some time aside. If you have any interest in this technology, the video is definitely worth your time. Even if you don’t care about the technical details, native compilation is going to be a boon to your Emacs experience simply because things will be faster.

Posted in General | Tagged | Leave a comment

Red Meat Friday: Cursive’s Last Stand

It’s been a while since I’ve ventured into the emotional minefield that is cursive handwriting. Here’s a couple of tweets from Paul Graham that make two very good points:

The first is a meta remark about handwriting in general. As Graham says, there are very few places where it’s absolutely required. One of those is taking exams and if your (cursive) handwriting, like mine, is execrable, you can even lose points for illegibility.

The second is that things would be better if we got rid of cursive. Graham’s characterization of it as “the weird copperplate script they call ‘cursive’” makes a point that is often missed: cursive really is an atavistic throwback to an earlier time that has no more relevance today than, say, the Gutenberg Press. It’s interesting and important in an historical sense but simply has no place in our day-to-day lives.

Its uselessness in modern life is made clear when you consider the arguments advanced for the continued teaching of it. Its advocates say things like, “If we don’t teach cursive, students won’t be able to read the Declaration of Independence or The Constitution in the original.” That no one insists we should be teaching ancient Greek so that students can read the Iliad or the Odyssey “in the original” shows how silly that argument is. The other arguments for cursive are likewise special pleading.

It’s well past time that we laid this anachronism to rest. Even if you force students to learn it, they, like Graham and I, will abandon it as soon as they can. It’s really just a waste of class time that many students find painful and almost all find pointless.

Posted in General | Tagged , | Leave a comment

Cloning Buffers

Mickey Petersen tweets about cloning buffers and makes explicit a distinction that I must admit I wasn’t clear on.

I’m pretty familiar with indirect buffers, which are a clever way of looking at a buffer with two different views: you can have different narrowings, point positions, modes, and other properties while still maintaining identical text. Text changes made to the indirect buffer or the base buffer are instantly reflected in the other. It’s almost always what you want but sometimes it’s convenient to simply make an independent copy of a buffer.

Mickey’s tweet shows you how to do either. Oddly, I couldn’t find clone-buffer in the manual but its documentation available with describe-function (Ctrl+h f) and has been around for a long time.

As I said, you almost always want clone-indirect-buffer or its siblings. I’ve used it a few times but I’ve never used clone-buffer. Still, it’s nice to know they’re both available. As usual, Emacs has us covered.

Posted in General | Tagged | Leave a comment