0

To organize reading tasks, I use org-mode checkboxes in the following way:

* TODO author, book_title [3/12]
 - [X] chapter_01
 - [X] chapter_02
 - [X] chapter_03
 ...
 - [ ] chapter_12

Since it is tedious to write this up for every book, I was thinking of using yasnippets to come up with some interactive snippet that would take as argument the "n" number of chapters and produce something of this sort:

 - [ ] ${1:chapter_title_01}
 - [ ] ${2:chapter_title_02}
 ...
 - [ ] ${n:chapter_title_0n}

that would allow me to input the chapter titles one by one.

My elisp knowledge is limited, so the question is: Has anybody succeeded in implementing something similar with yasnippets or else? Thanks!

1 Answers1

0

You probably don't need a snippet or a function. Try the following workflow:

  • Enter the headline with the title of the book.

  • Enter a '-' and then press M-S-RET: the dash moved down to the next line and you get a checkboxed list item.

  • Enter the title of the first chapter ending with M-S-RET and continue on like this until you've run ouf of chapters.

  • Finally delete the dash at the end.

That'd be enough for me, but YMMV: try it and see!

NickD
  • 5,937
  • 1
  • 21
  • 38