branch: externals/denote commit a5986742be68afe79869aab4dfa619690c5a8c86 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Note the features of filenames for search/filter --- README.org | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index dbeaf4fe0f..17a7c91ca0 100644 --- a/README.org +++ b/README.org @@ -245,7 +245,7 @@ say, ="\\([0-9T]+?\\)--\\(.*?\\)_"= captures the date in group =\1= and the title in =\2= (test any regular expression in the current buffer by invoking =M-x re-builder=). -[[#h:8ed2bb6f-b5be-4711-82e9-8bee5bb06ece][Extending Denote]]. +[[#h:1a953736-86c2-420b-b566-fb22c97df197][Features of the file-naming scheme for searching or filtering]]. While Denote is an Emacs package, notes should work long-term and not depend on the functionality of a specific program. The file-naming @@ -270,6 +270,36 @@ holds the relevant value. In simple terms: + Keywords should not have spaces or other delimiters. If they do, they are converted into hyphens. Keywords are always downcased. +** Features of the file-naming scheme for searching or filtering +:PROPERTIES: +:CUSTOM_ID: h:1a953736-86c2-420b-b566-fb22c97df197 +:END: + +File names have three fields and two sets of field delimiters between +them: + +: DATE--TITLE__KEYWORDS.EXTENSION + +The first field delimiter is the double hyphen, while the second is the +double underscore. These practically serve as anchors for easier +searching. Consider this example: + +: 20220621T062327--introduction-to-denote__denote_emacs.txt + +You will notice that there are two matches for the word =denote=: one in +the title field and another in the keywords' field. Because of the +distinct field delimiters, if we search for =-denote= we only match the +first instance while =_denote= targets the second one. When sorting +through your notes, this kind of specificity is invaluable---and you get +it for free from the file names alone! + +Users can get a lot of value out of this simple arrangement, even if +they have no knowledge of regular expressions. One thing to consider, +for maximum effect, is to avoid using multi-word keywords as those get +hyphenated like the title and will thus interfere with the above: either +set the user option ~denote-allow-multi-word-keywords~ to nil or simply +insert single words at the relevant prompts. + * Points of entry :PROPERTIES: :CUSTOM_ID: h:17896c8c-d97a-4faa-abf6-31df99746ca6