Emacs: denote version 0.2.0
Denote is a simple note-taking tool. It is based on the idea that notes should follow a predictable and descriptive file-naming scheme. The file name must offer a clear indication of what the note is about, without reference to any other metadata. Denote basically streamlines the creation of such files while providing facilities to link between them.
- Package name (GNU ELPA):
- Official manual: https://protesilaos.com/emacs/denote
- Change log: https://protesilaos.com/emacs/denote-changelog
- Git repo on SourceHut: https://git.sr.ht/~protesilaos/denote
- Mailing list: https://lists.sr.ht/~protesilaos/denote
Below are the release notes.
0.1.0(from 2022-06-27) was never built as a package. The reason is that the GNU ELPA machinery reads the
Version:header of the main file, not the git tag. As the original commit in
Version: 0.1.0, GNU ELPA rightly tries to build the package using that reference. But because at that time I had not yet updated the Copyright header to name the Free Software Foundation, the package could not be prepared. As such, please consider this release to be the “first formal stable version”. My apologies for the delay, contrary to what was promised in the last change log entry.
Prospective users are advised to read the manual: https://protesilaos.com/emacs/denote. For a video demonstration: https://protesilaos.com/codelog/2022-06-18-denote-demo/.
Thanks to Benjamin Kästner for reporting the issue with the GNU ELPA package on the mailing list: https://lists.sr.ht/~protesilaos/denote/%3C9d600ff0firstname.lastname@example.org%3E.
- Originally, Denote was designed to only work with notes in a flat
directory. With code contributions from Jean-Philippe Gagné Guay,
support for subdirectories of the user option
denote-directoryis now available. This covers the case of creating links between notes, following them, and viewing the backlinks’ buffer of the current entry.
- Thanks to Jean-Philippe for the contributions which took place on the GitHub mirror:
- Jean-Philippe Gagné Guay has assigned copyright to the Free Software Foundation. This is a prerequisite to contribute code to any package on the official GNU ELPA archive (and to emacs.git for that matter).
- The new
denote-subdirectorycommand lets the user select a directory to place the new note in. Available candidates are the value of the
denote-directoryas well as all of its subdirectories, minus
.git. In future versions, we will consider how to provide a blocklist or a regexp filter for the user to specify which subdirectories should be omitted from minibuffer completion. Please consider providing your feedback on the technicalities.
Thanks to Jean-Philippe Gagné Guay and Shreyas Ragavan for the feedback in issue 31 on the GitHub mirror: https://github.com/protesilaos/denote/issues/31.
Thanks to Jean-Philippe Gagné Guay for fixing a potential problem in how directories are represented when commands enter the directory instead of selecting it (again, at the GitHub mirror): https://github.com/protesilaos/denote/pull/35.
- From 2022-06-24 to 2022-07-03, Denote provided support for links
between Org notes that leveraged the
id:hyperlink type. Discussions on the mailing list and the GitHub mirror revealed the longer-term problems in our implementation. In the Annex below, I provide my detailed opinion on the matter. The gist is that Denote does not—and will not—create
id:links between its notes, but shall use the
denote:hyperlink type instead (which works like the standard
file:type). As the Annex explains, Denote is not org-roam lite and we try not to engender such false expectations.
The user option
denote-date-formatcontrols how the date and time is recorded in the file’s contents (what we call “front matter”). When nil (the default value), we use a file-type-specific format (also check the user option
For Org, an inactive timestamp is used, such as
[2022-06-30 Wed 15:31].
For Markdown, the RFC3339 standard is applied:
For plain text, the format is that of ISO 8601:
If the value is a string, ignore the above and use it instead. The string must include format specifiers for the date. These are described in the doc string of
denote-date-formatsupersedes the now obsolete
Thanks to Peter Prevos and Kaushal Modi for their feedback in issue 27 on the GitHub mirror: https://github.com/protesilaos/denote/issues/27.
- All the faces we define are now declared in the
denote-faces.elfile. The fontification rules are shared by
denote-dired-modeand the backlinks’ buffer (invoked by
denote-link-backlinksand controlled by the user option
denote-link-fontify-backlinks). The current list of faces:
Named the mailing list address as the
Maintainer:of Denote. Together with the other package headers, they help the user find our primary sources and/or communication channels. This change conforms with work being done upstream in package.el by Philip Kaludercic. I was informed about it here: https://lists.sr.ht/~protesilaos/general-issues/%3C875ykl84yi.fsf%40posteo.net%3E.
Fixed how keywords are inferred and combined. The previous code did not work properly when the user option
denote-infer-keywordswas nil. It would return a list of symbols, with the parentheses, whereas the file name needs a string where each keyword is delimited by an underscore.
Simplified how information in the front matter is retrieved. It fixes cases where, for example, a special character at the end of the title was ignored. Thanks to Jean-Philippe Gagné Guay for the patch over at the GitHub mirror: https://github.com/protesilaos/denote/pull/21.
- Rewrote parts of the manual in the interest of clarity.
Annex about discontinuing support for org-id
My thanks for their participation in the discussions go to Jean-Philippe Gagné Guay, Kaushal Modi, and Shreyas Ragavan.
commit f35ef05cb451f265213c3aafc1e62c425b1ff043 Author: Protesilaos Stavrou <email@example.com> Date: Sun Jul 3 17:34:38 2022 +0300 REMOVE support for 'id:' hyperlink types The original idea was to support the 'org-id' library on the premise that it makes Denote a good Emacs citizen. However, discussions on the mailing list and the GitHub mirror have made it clear to me that 'org-id' is not consistent with Denote's emphasis on simplicity. To support the way 'org-id' works, we will eventually have to develop some caching mechanism, just how the org-roam package does it. This is because the variable 'org-id-extra-files' needs to be kept up-to-date whenever an operation on a file is performed. At scale, this sort of monitoring requires specialised software. Such a mechanism is outside the scope of Denote---if you need a db, use org-roam which is already great.  <https://lists.sr.ht/~protesilaos/denote/%3C8735fk4y1w.fsf%40hallac.net%3E#%3C877d4un73c.firstname.lastname@example.org%3E>  <https://github.com/protesilaos/denote/issues/29> Quote of what I wrote on the GitHub mirror issue 29: [ggjp] This is what I was implying. That we are, in fact, providing an option that is not viable long-term, but keeping the option for expert users who will be able to handle this. And we should warn about this clearly in the doc of that option. [protesilaos] What you write here @ggjp and what @shrysr explained tells me that those expert users will need to be real experts. To put it concretely, I am an experienced Emacs user with no programming background, who has written several Emacs packages (including the modus-themes which are built into Emacs), but I have zero knowledge of using a db or of handling things with python and the like. So if I opt in to 'denote-link-use-org-id' I will eventually run into problems that my non-existent skills will prevent me from solving. At that point, I will just use org-roam which already handles this use-case in a competent way (and has a massive community to rely on in case I need further support). If each package needs to write its own optimisations and maintain its own cache, to me this shows that 'org-id' is not good enough for the time being: more work needs to be done in org.git to provide a universal solution. I wanted to support 'org-id' by default on the premise that Denote must be a good Emacs citizen which interoperates with the rest of the wider ecosystem. But if 'org-id' leaves something to be desired, then that goal is not worth pursuing: we add complexity to our code, offer an option that we cannot genuinely/adequately support, and make usage of it contingent on reading the docs and having a high level of expertise. I think being a good Emacs citizen is a laudable principle. In this case, the right thing to do is to recommend the use of org-roam instead of trying to accommodate 'org-id'. As such, I have now changed my mind and think we should remove what we previously added. For some context here: the reason I never used org-roam is because (i) it is Org-specific whereas I write notes in different file types and (ii) I did not want to ever rely on a db or equivalent dependency. <https://github.com/protesilaos/denote/issues/29#issuecomment-1173036924> README.org | 226 ++++++++--------------------------------------------- denote-link.el | 99 ++++++----------------- denote-retrieve.el | 2 +- denote.el | 14 +--- 4 files changed, 63 insertions(+), 278 deletions(-)
Followed up by my explanation:
> can we not have denote style links to be default for (de)notes - and > explicitly supported, while if they need to, users can still link > denote org files via org-id to any other notes/files (and vice versa) > -- in which case performance + testing for org-id driven linking is > not within Denote's purview at all? The formal support for `id:` links was added shortly before the release of version `0.1.0`. In the days prior, we supported what you describe via the manual. The user could change the `denote-org-front-matter` variable to include a `PROPERTIES` drawer. This possibility still exists, though yesterday I removed the relevant entry from the manual. This way only the real do-it-yourself experts will go down that path. My concern here is with managing expectations. If our Org notes are superficially the same as org-roam's, an unsuspecting user may think that Denote is an org-roam lite. We will thus get issues/requests, such as those already mentioned in this GitHub repo, about migrating from org-roam to Denote. While there are similarities, Denote is not a minimalist org-roam and I would not like to encourage the idea of treating the two as interchangeable. Doing things half-way-through is a way to create false expectations. A package on GNU ELPA must be usable by users of all skill levels. If the functionality we provide is incomplete and needs to be covered by user-level tweaks, we are excluding a portion of the user base while still assuming the maintenance burden. If someone trusts Denote to, say, write a 1000 notes, we do not want to surprise them after the fact. Imagine if the reported issues that triggered this change happened 6 months into one's daily usage of Denote: it wouldn't be nice. Setting the right expectations is a matter of responsibility: we let the user make a more informed choice and show respect for their time. It also makes it easier for me to keep Denote's scope in check by not supporting every little extra that Org implements. The premier Org extension is org-roam: we do not need another one (or, if we do, I am not the one to implement it). * * * Some comments on the `denote:` hyperlink type for Org as they may be relevant in this context: * It is meant to work like the standard `file:` type. This means that it links to a file, while it can also have additional search parameters, as explained in the Org manual. Evaluate: (info "(org) Search Options") * It does not read the front matter, but only the file name. You can create a note as usual, delete all its contents, save it, and try to link to it from another note. It works. * Exporting now works like the `file:` type for HTML, LaTeX, Texinfo, and Markdown. Technically, it also supports the ASCII backend but the format of the output could be tweaked further. There may be refinements to be made, which is okay as that is part of a maintainer's duties.