denote-review
Implement a simple review process for denote notes with denote-review
How an Emacs package came into existence
Systems in use
Over time I have grown into using several different note systems next to each other, like taking notes in awkiawki wiki and in denote.
Both were a succession of earlier systems:
- My notes in awkiawki once started as notes in vimwiki.
- My notes in denote once started as notes in Deft for Emacs.
OBTF
Thinking about the best way forward I experimented with different options.
Moving towards an OBTF --One Big Text File-- looked promising. I explored org mode options like org refile. To get familiarized I set up some exercises, configured an org capture for an OBTF and started using it.
After getting some hands on experience, I came to the conclusion that I prefer a lot of small note files above one big one.
Migrated awkiawki
I decided to migrate the awkiawki notes to denote and wrote a small Guile Scheme script to convert the wiki formatted notes into denote formatted notes (in org mode). Links between wiki-notes became links between denote notes.
After the migration I ended up with over 1,300 notes in denote.
Need for a reviewing process
All notes are created equal, but some are more equal than others.
It was clear that I needed a system to review the collection of notes, get rid of notes that addressed the same topic or were outdated, and which notes are underdeveloped. Knowing myself, this would result in a early death without a systematic approach.
I started thinking about a simple set up, that would not get in your way and wouldn't affect being "in the flow" when working with notes.
Denote notes
Notes are unstructured data by default, but denote notes start with some structured data, called "frontmatter". It contains metadata like the title, keywords (think: tags), an identifier and the creation date of a note.
This seemed the best place for a small addition. I thought about setting a deadline for each note, before which it had to be reviewed, but that opens another rabbit hole and I decided against it.
I ended up with creating a small system that added an extra field to the frontmatter, a line that stated the last review date, and a method to select some notes and order these by that review date.
I build this and brought it under the attention of Protesilaos Stavrou, the creator of denote, also known as "Prot". Denote supports different kind of formatting of the frontmatter, markdown-toml, markdown-yaml, plain text, and org mode. I had build my system for my own needs, and it just supported org-mode.
Prot nudged me into making the system more general, by adding support for the other formats. This turned out less complicated than I had originally envisioned and the system grew into a usable Emacs package. I submitted the package for inclusion in GNU ELPA. Philip Kaludercic and Stefan Monnier helped me improved the code, and the rest is history.
Usage
denote-review adds an extra line to the frontmatter. Here's an example of the frontmatter of an org-mode formatted denote note:

The function denote-review-set-date adds the reviewdate to the frontmatter,
or updates it to the current date.
For convenience, bind this to a keychord, for example:
(define-key global-map (kbd "C-c n x") #'denote-review-set-date)
To get started, select a number of notes in Dired and bulk-insert the frontmatter into these notes, see below.
After extending the frontmatter of several notes with a review data it becomes useful to list them, using the command:
M-x denote-review-display-list
This command prompts for a denote-directory when needed (when there is more
than one denote-directory in your Emacs configuration, or when you have
set up several directories using denote-silo). Select a directory
using completion.
Next, the command prompts for a keyword to narrow the list to. Choose a keyword or just hit RET (the enter key) for all notes.
This creates a tabulated list with for each note the review date and the file name:

Only notes that contain the reviewdate frontmatter are displayed, notes without a review date are ignored.
The notes are sorted by review date. Click on one of the column headers to
order by the contents of that column or to reverse the sort order.
Using the key S (uppercase, so shift-s) performs the same actions.
Select a line by moving point up or down in this list. With a single key press, perform one of the following commands:
| Key | Action |
|---|---|
| RET | Open and edit the note in another window. |
| e | Open and edit the note. |
| o | Open the note in read only mode in another window. |
| r | Open a random note from the list in another window. |
| g | Update (refresh) the tabulated list. |
| q | Close the tabulated list. |
The tabulated list mode comes with a number of build-in commands, like
p and n to move to the previous or next line,
SPC and DEL (space bar and backspace key) to scroll down or up.
The general idea is that you from time to time set up a review sessions:
- select a number of notes, f.e., notes with a specific keyword
- go through the list and review notes, for each note edit where needed
- update the reviewdate of reviewed notes
Slowly moving to the situation where all notes have a recent review date.
Note: The filenames in the screenshots above are based on headers in the README from Protesilaos Stavrou, see protesilaos.com/emacs/denote
Bulk-insert the review date
Open a denote-directory in Dired and mark one or more notes with m.
Unmark a marked note with u.
To bulk-insert the review date there are two options:
The original creation date as review date
Issue the command
M-x denote-review-set-date-dired-marked-files
This will insert a frontmatter line with the review date derived from the date encoded in the first chars of the filename.
The current date as review date
Enter the Universal Argument C-u
Issue the command
M-x denote-review-set-date-dired-marked-files.
This will insert a frontmatter line with the current date a review date.
Select multiple notes in Dired
Like Prot has written in his denote manual, it is easy to select and mark a number of notes in Dired using a regexp.
For example, to select and mark all notes with the keyword "foo":
- press
%m - enter
_foo RET
To reverse the selection (all notes that don't have the keyword "foo"):
- press
%m - enter
_foo RET - press
t(toggle)
Happy note taking!
Webrings
100% made with ♥ by a human — no cookies, no trackers.
Proud member of the 250kb.club,
the no-JS.club,
the Blogroll.Club,
and the Bukmark.Club.
Don’t let a billionaire’s algorithm control what you read — use an RSS feed reader.
Most recent pages All tags Sitemap RSS of Gophersite
