A Reminder About org-clone-subtree-with-time-shift

JTR over at The Art Of Not Asking Why has a useful reminder about something that I, at least, always forget about: org-clone-subtree-with-time-shift. The idea is that you have something scheduled on a certain day but want to repeat that event regularly. You can add a repeater to the entry that will repeat it at fixed intervals. For example, if you have a weekly meeting on Friday at 10 AM you can add an entry for that meeting and the repeater +1w and the task will appear every Friday.

You can also clone an entry a given number of times. For example, suppose you have a class everyday at 8 AM for 3 days. You can make an entry for the first day and then use org-clone-subtree-with-time-shift to add two more entries on subsequent days.

Scheduling events with Org mode really is a lot more flexible than you might imagine. The org-clone-subtree-with-time-shift function is an example. You can take an existing entry and clone it any number of times at any given fixed interval. It’s much easier than trying to do this by hand.

There are, of course, some nuances so be sure to take a look at the Docstring for the function.

Posted in General | Tagged , | Leave a comment

Burst-driven Development

Most serious Emacs users are familiar with Bozhidar Batsov. He’s a blogger and the developer/maintainer of several OSS and Emacs projects such as RuboCop, CIDER, Projectile, nREPL, and many others. And, of course, he has a full time job. That brings up a question that Batsov says he is often asked: “How does he find time to work on all these projects?”

He answers that question in a recent post on his (think) blog. The secret, he says, is “burst-driven development”. By that he means that while he may keep an eye on his bigger projects he will only work on one or two at a time in a burst of effort. During those periods, he may work on a project furiously for several days or weeks and then move on to something else. The important thing for him, he says, is to not try to work on several projects in parallel.

This type of schedule may seem less than optimal for project development but Batsov has learned a few things that suggest it’s good enough:

  • Few problems require immediate action
  • There can be times when you don’t have any good ideas for improving a project
  • Sometimes a project is simply mostly done

That last item is especially telling. Often I’ll see complaints about some project saying that it hasn’t had any updates for a long time. But sometimes a project solves the problem it was written to address and there is little to add other than keeping up with OS changes or something of the sort.

In any event, if you want to see how a prolific developer handles his projects, take a look at Batsov’s post.

Posted in General | Tagged | Leave a comment

JTR On Projects In Emacs

JTR over at The Art Of Not Asking Why has a post discussing his current scheme for handling projects in Emacs. It’s a post that discusses the problem that many of have with integrating our Org files across all our devices. JTR, like me, lives in the Apple ecosystem and needs a way of interacting with his Org files from his iPhone and iPad. The situation isn’t any better in the Android world.

For various reasons, JTR has stopped using iCloud for his syncing. I’m sympathetic to his complaints but doubt that any other solution would be an improvement. Servers go down and there are network problems. This happens regardless of what cloud solution you’re using. If you’re fortunate to work from home, you can, of course, arrange to do everything locally, which avoids many of the cloud problems.

Given these realities, JTR has settled on some procedures to ease his workflow. Oddly, most of them don’t involve the networking aspects of his workflow. Rather, he restructured how he arranges his Org files and made all his workflows project oriented. You can read the details in his post and judge whether or not they’ll work for you.

The takeaway is that trying to spread access to your Org files—or more generally, your Emacs files—across all your devices is a difficult problem for which there isn’t a compelling solution. Beorg or Plain Org are nice apps that can help in the Apple domain and there are others for Android but they’re not the same as being in Emacs. In the end, you may have to adjust your Emacs use in some way as JTR did.

Posted in General | Tagged , | Leave a comment

Snippets With Abbrev Mode

I’m a big user of yasnippet. I invoke it several times a day in various contexts. I also use the builtin Emacs abbrev-mode for some simpler text substitutions: “ra” for “→” for instance. Again, I usually use this facility several times a day.

One of the endlessly entertaining things about Emacs is that it’s always surprising you with capabilities you didn’t know about. Just the other day, I learned about delete-pair and have been using it ever since. Today, I learned something else that I had no idea existed. You can use abbrev mode in the same way as yasnippet.

Rahul M. Juliato has a very interesting post about how to use abbrev-mode like yasnippet. It turns out that you can specify a function after the substitution part of the abbrev definition and it will operate on the substituted text.

Juliato first shows a simple function that repositions the point. He uses that to implement source code blocks for Markdown and Org mode. But there are no real restrictions on the function so he shows how to implement replacement placeholders as in yasnippet.

All of this is really interesting but a case can be made that yasnippet can already do this and more easily. The thing is, though, as I said, there are no restrictions on the functions that work on the replacement text so you can do pretty much anything you can imagine. To be sure, you’re going to have to write some Elisp but depending on the application, it may be worth it.

You may never have occasion to use this capability but it’s wonderful to know it’s there.

Posted in General | Tagged | Leave a comment

Red Meat Friday: Gategate

I don’t know about the rest of you but I’m fed up with the “-gate” meme. Lazy and generally ignorant journalists keep describing every would be scandal—no matter how trivial—as x-gate. The latest example that I’ve seen is the so called scratchgate concerning Apple iPhone 17s. Whatever the merits of this story, it’s hardly a scandal and even if it were, it doesn’t rise to the level of the actual Watergate Scandal.

A lot of the journalists who invoke and abuse this meme probably have no idea where the term comes from and those who do likely have only a vague notion of “some Nixon scandal before I was born”. Watergate—named after the office complex where the crime took place—was a serious scandal that resulted in the resignation of a president and informed American politics for a long time.

Purported scratches on an iPhone or any of the other so-called scandals ardently reported by uninformed journalists don’t rise to the same level. The overuse of this phrase brings to mind Orwell’s Politics and the English language. The theme is the same: Lazy journalists overusing trite phrases sucked dry of any meaning resulting in the debasing of the English language.

So here’s my plea. Can we please stop labeling every controversy as somethinggate. Almost none of them rise to the appropriate level and are mostly used, as Orwell suggested, to advance some political agenda.

Update [2025-11-18 Tue 11:08]: phase → phrase

Posted in General | Tagged , | Leave a comment

Short Yes/No Answers

Like most longer term Emacs users, one of the first things I did was to get rid of the annoying long-form Yes/No questions that required you to answer “yes” or “no” explicitly. That was easy to do. I simply aliased y-or-n-p to yes-or-no-p. The same code is in virtually everybody’s init.el if they started before Emacs 28.

Starting in Emacs 28, the variable use-short-answers was introduced. When non nil it causes yes-or-no-p to call y-or-n-p to ask the question instead of following its normal path.

Lennart Karssen over at Polyomica recently discovered this and wrote a short post about it. He, like almost everyone else hates the long answers. They’re there for a reason, of course, and the documentation for the variable recommends against setting it non nil but I doubt very many folks follow that advice.

I’ve had my original aliasing code for at least 17 years and see no reason to change it. When use-short-answers was first introduced, I thought I should adopt it but I never did and as far as I can see, it doesn’t make any difference.

In the unlikely event that you weren’t aware of how to turn off the requirement for entering long answers, take a look Karssen’s post or just check the documentation for use-short-answers.

Posted in General | Tagged | Leave a comment

Finding The File At Point

I just discovered a useful trick over at Ruslan’s Tech Blog. It’s about finding the file at point. Ruslan does this a lot. I, on the other hand, hardly every do it but I have gotten used to typing Ctrl+c Ctrl+o to follow a link in an Org buffer. Despite using the goto-addr package, this doesn’t work reliably everywhere.

Ruslan was also bothered by the difficulty of opening a file at point—although his normal usage didn’t involve Org. Like many of us, he thought he’d just write a quick command to do what he wanted but before embarking on that, he read the documentation for find-file and discovered that the functionality he wanted was already there.

If the point is on a file path, you can invoke Meta+x find-file-at-point but that’s a lot of typing. It’s a bit less typing if you use its ffap alias but perhaps still too much. Instead, you can just type Ctrl+x Ctrl+f as usual and then Meta+n to follow the link at point. It’s a nice solution because you do what you always do when you want to open a file and then type Meta+n instead of a file path to open the file at point. Best of all, you don’t have to do anything to enable this. It’s the default Emacs behavior.

Posted in General | Tagged | Leave a comment

Unix v4

The Unix story is well known to most software nerds but lessor known is the story of Unix v4. To many, it’s just another in the long line of Bell Lab’s Computing Sciences Research Center’s Unix releases but it turns out to be special.

The original Unix was famously implemented in assembly language on an abandoned PDP-7 by Ken Thompson. As the project progressed other Bell Labs engineers joined the effort. Eventually it was realized that writing the system in a higher order language would improve the development effort but the Lab’s go to language for such things at the time was B, which was not up to the task. Dennis Ritchie solved that problem by extending B into the C language, which was specifically designed for the Unix system.

Version 4 of Unix was the first version in which most of the system, including the kernel, was written in C. It was a turning point in the design of operating systems and computer science in general. Sadly, the system was lost and only bits of the manual survive.

Until now. A week ago, it was announced on the The Unix Heritage Society’s mailing list that a tape labeled “UNIX Original From Bell Labs V4 (See Manual for format).” had been found in a storage room at the University of Utah. There’s a great story about it on Ponderwall.

Most younger nerds have probably never seen a 9 track tape but they were the main storage medium back when Unix was first being developed. Like all magnetic tape, they deteriorate over time, especially if they aren’t maintained in a controlled environment. For that reason, it’s unclear if the tape can be read. It’s being hand delivered to the Computer History Museum, which has specific expertise in recovering data from old media. Let’s hope that they succeed and that this important part of our heritage can be recovered.

Posted in General | Tagged , | Leave a comment

Setting avy-timeout-seconds To A More Reasonable Value

As longtime Irreal readers know, I am an Avy fanatic and use it as my principal means of buffer navigation. For a long time, I mostly used avy-goto-word-1 but it can only be used to search for the beginning of words. Four years ago, Karthink Chikmagalur published a post that recommended using avy-goto-char-timer exclusively. For some reason, I ignored his post at the time but a couple of years ago I was reacquainted with his recommendation and resolved to use avy-goto-char-timer more.

One day I suddenly realized that I was, in fact, using it exclusively and couldn’t even remember my binding for avy-goto-word-1. It solves the problem of avy-goto-word-1 being able to find only the beginning of words.

As the name suggests, avi-goto-char-timer will accept input chars until there’s no input for the timeout value. Then it will present a tree of potential targets having those characters. The default timeout value is 0.5 seconds so if you stop typing for half a second, avy-goto-char-timer will present you with a tree of targets.

Lately—perhaps because I mostly work with my laptop on my lap or perhaps because of declining reaction times—I’ve found that half a second isn’t quite long enough. It often produces suboptimal outcomes, resulting in spurious characters being added to the text in the worst case.

As often happens, I put up with this infelicity for some time before I finally got fed up enough to do something about it. The “something” in this case was trivial. I simply increased the timeout value to 1.5 seconds. That may be a little long but it seems fine so far. I can, of course, always decrease it a bit if it turns out to hold things up.

Posted in General | Tagged | Leave a comment

Org Tables In Comments And Docstrings

If you’ve been using Org-mode for a while, you’re probably familiar with its table editing functionality and may even know that you can use that functionality anywhere in Emacs with orgtbl-mode. For most non-Org applications, of course, those tables will be in some sort of comment.

Andrew over at the Listful Andrew site has a useful post on how to do that. It’s a little more finicky than you might think because the editing won’t work if the table lines are commented out. It’s easy to work around that, of course, but Andrew offers some other strategies.

When you’re in Elisp, the easiest way to add a table to a comment is to add it do a Docstring. That’s easy and the table can be edited at will. Andrew offer another method using his custom description macro. Most of us won’t have that macro, of course, but it’s another strategy.

Finally, Andrew considers adding tables to Bash comments. The problems are similar to those encountered with Elisp: you can’t edit tables whose rows are commented out. As with Elisp, that’s easily worked around but again there are better ways.

One way is to use the null command : to introduce the comment string. See Andrew’s post for the details. Another way is to use a here document or a here string. Again, see Andrew’s post for the details.

Tables in comments isn’t something that you need all the time but it’s nice to have to ability to add them when you do. Andrew’s post is a nice demonstration of how to do that.

Posted in General | Tagged | Leave a comment