Org to Dotfiles

Back in 2016, I wrote about Haoyang Xu’s idea of keeping all your dotfiles in a single Org-mode file that tangles the individual dotfiles to their proper place in your directory structure. This allows you to write the dotfiles in a literate way and have a single, version controlled source for them. Sadly, Xu’s post has disappeared so his examples are no longer available.

Happily, Toon Claes has rediscovered the idea and posted a description of his process. He also has a GitLab repository with the dotfiles he’s implemented in this way. Claes has a separate Org file for each dotfile but there’s no reason they couldn’t be combined into a single file. If you follow the link at the bottom of each Org file to the source and then click on the Display source button, you can see the raw Org that he used.

I really like this idea although it’s probably not worth the effort if you have a single machine. If, like me, you have two or more machines running the same OS, it can be a real win. If you like keeping your configuration files under version control and want a way of recording why you made the choices you did for your dotfiles, this can be a useful technique. It’s just another example of how Org is assimilating everything.

Posted in General | Tagged , | Leave a comment

Scrolling with Emacs

Back when I was still a Vim user, I would occasionally try Emacs because of its nice features. It never stuck—until it did—because some of its behavior seemed too alien. The most prominent example of that was the scrolling. By default, Emacs has a sadistic scrolling mode where the screen will suddenly scroll up when the point got a certain distance from the bottom of the window. I found it very jarring and usually abandoned my Emacs adventure shortly after it started. I can see how, in a theoretical sense, you can make the case that the default behavior is the right thing but I can’t believe anyone actually likes it1.

Of course, I was a n00b then and didn’t understand that with Emacs you can have it your way. A little Googling and I discovered that it’s easy to stop that scrolling behavior. I did that 10 years ago and really haven’t thought about scrolling since.

Now Clemens Radermacher over at (with-emacs has his own issues with scrolling and wrote a bit of Elisp to get scrolling the way he likes it. His solution scrolls the screen by half a page each time he calls his code and highlights the line the point is on for a short time. There’s an animated GIF in his post so you can see what the result looks like.

If you’re dissatisfied with Emacs’ scrolling, take a look at Radermacher’s post and see if his method feels more comfortable.

Footnotes:

1

This will, I know, bring me many explanations of how it is the right thing but I stand by my judgment. Of course, that’s the beauty of Emacs: we can both be right. Or at least have it our way.

Posted in General | Tagged | Leave a comment

Proced on the Mac

Four and a half years ago I wrote about proced and Mickey’s excellent post about it. Sadly, it didn’t work on the Mac so I forgot about it until I saw this tweet from psnebc:

On a whim, I checked to see if it had finally been ported to the Mac and was delighted to find that it had. On rereading Mickey’s article, I see that in the comments Steve Purcell notes that they’d just merged support for the Mac into the Master branch. Mickey doesn’t supply any dates so it’s hard to know when Purcell made that comment but I’m guessing that it was contemporaneous with Mickey’s post. That means that:

  1. I’m probably the last person on Earth to learn that proced is now available for the Mac, and
  2. I’ve gone 4 years without the benefit of this excellent Emacs feature.

The bottom line for me is that now there’s one less function that I have to fall back to the shell for. I can get all the information that I’ve been depending on ps and top to give me right in an Emacs buffer. Life is good.

Posted in General | Tagged | Leave a comment

An Example of an Engineering Notebook

Antonin Januska has posted a video showing how he set up and uses an engineering notebook. I’m always interested in how people implement engineering/scientific notebooks and Januska’s video is especially interesting because he implemented his as an Org-mode file.

His idea is that the notebook shouldn’t be a log so much as a collection of technical notes to remember how he accomplished some task or even shortcut key sequences that he might otherwise forget. His set up is a nice example of starting slow with Org-mode and learning new features as you need them.

His notebook is a sequence of topics as the top level headings and lists of items or further subheadings underneath the main headings. The most complicated thing he uses is code blocks and he hasn’t gotten around to making them executable yet. Again, it shows how far just a little Org-mode can go.

The video is only 10 minutes, 48 seconds so it should be easy to fit it in if your interested in seeing how you might set up an engineering notebook.

Posted in General | Tagged , | Leave a comment

China Backs Plan S

The Open Access movement got some good news when China announced they would back Plan S. Plan S is the European-led program to make all publicly funded research freely available upon publication in a journal.

One would hardly think this would be controversial. After all, the public pays to have the research done and then has to pay again if they want to see the results. The journal publishers love it, of course: they don’t pay for the research, they don’t pay for the writing, they don’t pay for the reviewing, and, often, they don’t even pay for the editing yet they get to sell it back to the producers at outrageously high subscription fees. The University of California, for example, spends about $8.7M per year on subscriptions from Elsevier alone.

The U.S. and Europe have been pressing the publishers on open access issues for some time but China’s announcement caught everyone by surprise, especially the publishers. China is a huge market and produces a significant amount of research so their support of the open access movement is a big deal.

Irreal would be failing in its curmudgeonly duty if we didn’t point out that the problem the open access movement is trying to remedy is largely the result of the victims’ own actions. The publishers’ only leverage—if you want to publish your paper in our journal, you can’t make it available for free or you can’t make it available until a year after publication—disappears if academics simply refuse to publish in those journals. The problem is that publishing in top flight journals, which largely adhere to those restrictions, are important in tenure and promotion decisions so faculty continue to submit their papers to those journals. I don’t expect a lot progress until academia resolves its own issues.

Posted in General | Tagged | Leave a comment

Tell Me Again Why You’re Still Using Windows

Microsoft has been caught again spying on their users. Microsoft, of course, claims it’s all a big misunderstanding. They explain, Facebook like, that if you don’t want to share your data you have to adjust this obscure setting involving diagnostic data not the setting labeled “Send my activity history to Microsoft.” Or maybe you have to adjust them both. It’s hard to tell and Microsoft isn’t very helpful to users trying to set up their machines to maintain a decent level of privacy.

Google, of course, is a bigger invader of its users’ privacy but at least they have the decency to provide their services for free. Microsoft, on the other hand, makes you pay ($139 for the Windows 10 “Home” edition) for the privilege of being spied on. Their users—at least some of them—are angry and mumbling darkly about suing under Europe’s GDPR. Microsoft will claim that, “Gee, we did have a setting—or series of settings—that turn off the collection” so we’re not doing anything wrong. It’s hard to say what those in charge of GDPR enforcement will say but the Dutch Government’s reactions to similar findings isn’t encouraging.

Regardless, it’s hard to feel sorry for Microsoft’s users. This type of thing keeps happening and every time it does, the users are shocked and repair to their fainting couches but they keep using Windows. As with Google, if you use their products, you’re going to be surveilled. Full stop.

Posted in General | Tagged | Leave a comment

Is Org the Borg?

I laughed when I saw this tweet:

but then I realized that it pretty much described me. First I started doing all my writing in Emacs (and later, of course, as much of everything else as I could) and then all that writing started being Org files.

It occurred to me that Org is like the Borg: it absorbs everything that gets near it. So laugh all you want but you will be assimilated.

Posted in General | Tagged , | Leave a comment

The Default Emacs Key Bindings

Despite being a Vi/Vim user for over two decades when I switched to using Emacs, I learned the default key bindings and never looked back. It was a choice that worked well for me and I’ve never regretted it. That’s why I’m always puzzled by the frequent and loud complaints about those key bindings. One user even asked the Emacs subreddit why people use the default bindings.

Some people prefer the Vim bindings because they’re easier on the hands. Others, like Xah Lee, have completely different bindings for efficiency reasons. I understand and accept all that but I don’t understand why people think the default binding are ridiculous and make no sense.

Over at the Emacs subreddit, c17g makes the case that the defaults make perfect sense and follow an easy to understand scheme. His post strikes me as well reasoned and convincing. Others will, I’m sure, disagree but if your complaint is that the bindings are too long and hard to understand, then c17g has a cogent counter argument.

Of course, if your complaint is that the bindings aggravate your RSI then your problem is chording and one of the Vi emulation packages is certainly a better bet. If you’re like Lee and want to minimize your lifetime keystrokes, you should take a look at Fly Keys and see if they work for you.

As usual, Emacs doesn’t force any particular way of doing things on us so we can all have it our way.

Posted in Blogging | Tagged | Leave a comment

SSL Update

SSL appears to be working now. Sorry for all the confusion.

Posted in Blogging, General | Tagged | Leave a comment

Or Maybe Not

Despite yesterday’s post, it appears that SSL is not, in fact, working for Irreal. I’ve been trying to reach my hosting provider’s technical support but without luck.

Sorry for the delay. I’ll let you know when things get resolved. In the meantime, do what you’ve always done to reach Irreal.

Posted in Blogging | Tagged | Leave a comment