Collecting some denote notes with dynamic block
===============================================

Over time, the number of your notes increases. The special file naming
scheme of denote, as well as the ability to filter notes in dired,
make it easier to keep track of your notes.

Denote includes the option to aggregate the contents of multiple
notes. This allows you to see how the contents relate to one another
and what is written where. This functionality is simple to utilize.
Give an expression to filter some notes and let denote collect and
insert the matching notes in a single file.

Denote
------
Denote is a wonderful and nifty tool for your personal notes.

You can use it to create some kind of Zettelkasten, or any other
system you like. Prot, the creator of denote, writes in the readme:

   Denote aims to be a simple-to-use, focused-in-scope, and effective
   note-taking and file-naming tool for Emacs.

I have been using denote for about six months now.

Denote is easy to use (if you are comfortable in Emacs) and stays out
of your way. Create links between notes, use tags, and filter notes in
dired.

Org dynamic block to insert file contents
-----------------------------------------
The readme states:

   Denote can optionally use Org's dynamic blocks facility to produce
   a section that lists entire file contents

This is a very useful function.

* Create a dynamic block in a note.
 Just insert a start line and an end line in a specific format.
 The start line includes the expression to filter the notes.
* Position point at the beginning of the start line and type C-c C-c.
* Denote applies the filter and inserts the contents of the matching
 notes.

Each time you enter the C-c C-c command, the block gets updated.

The expression to filter notes is a regular expression. This is
powerful, but not necessary difficult. Because of the file naming
scheme of denote, just "_mytag" is enough to select all the notes with
the tag `mytag'.

Define what and how
-------------------
The start line not only contains the expression by which to filter
notes, but also some parameters that define what to insert, and how.

* do or don't insert front matter
* do or don't apply reverse sort
* do or don't insert a file separator
* do or don't insert links to the corresponding note

What and how the notes should be inserted depends on the use case and
on your personal preferences.

My personal preference is:

 :reverse-sort nil :no-front-matter t :file-separator nil :add-links t

With this in the start line, denote inserts the selected notes in
chronological order, without front matter and starting with a header
that is a link to the corresponding note. It inserts a small
indentation to increase the readability.

Easy to create, easy to update, and easy to discard
---------------------------------------------------
Creating a dynamic block is easy to do.

The most convenient way is to add an examaple start line to your
skeleton system, like the Emacs abbreviation system, the Emacs
skeleton system, or something like Yasnippets. Use this to insert
the example start line, and edit the selection expression.

Updating a dynamic block is just a matter of typing C-c C-c.

When you no longer need the block, either just delete the
block or the note in which you created it.

Happy denoting!


Last edited: $Date: 2024/03/24 15:35:19 $