An Easy EmacsGolf Challenge

Here’s an easy EmacsGolf challenge that came up today. I have an org file in which some of the headings have a check mark (✓) at the beginning of the heading (but after the stars). The file is quite long and I want to count how many check marks there are in the file.

For clarity, the file looks something like this

 * Level 1.1
 ** ✓ Level 2.1
   blah blah blah
 ** Level 2.2
   blah blah blah
 * Level 1.2
 ** Level 2.1
   blah blah blah
 * Level 1.3
 ** ✓ Level 2.1
   blah blah blah
 ** Level 2.2
   blah blah blah
 ** ✓ level 2.3
   blah blah blah
...

Here are the rules:

  1. There are no check marks in the body of the text, only at the beginning of some headers.
  2. You may assume that there’s an abbreviation, cb, for ✓.

The challenge is to find the total number of check marks in as few a number of keystrokes as possible.

This entry was posted in General and tagged . Bookmark the permalink.