[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote e394057985 134/355: Document how to store multip
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote e394057985 134/355: Document how to store multiple types of notes |
Date: |
Sun, 26 Jun 2022 23:58:14 -0400 (EDT) |
branch: externals/denote
commit e394057985a7bd0ec25ac13d29bbe65ca0671e1e
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Document how to store multiple types of notes
---
README.org | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/README.org b/README.org
index f1f1aca778..02719d852b 100644
--- a/README.org
+++ b/README.org
@@ -575,6 +575,89 @@ scenaria where, say, one wants to organise their
collection of PDFs and
multimedia in a systematic way (and, perhaps, use them as attachments
for the notes Denote produces).
+* Notes in multiple file types
+:PROPERTIES:
+:CUSTOM_ID: h:f34b172b-3440-446c-aec1-bf818d0aabfe
+:END:
+
+As noted before, Denote does not have a particular preference on the
+workflow the user wishes to follow nor does it expect a specific file
+type. It is entirely possible to store notes in a variety of formats
+across multiple directories and Denote will still be able to work with
+them, provided they follow the file-naming scheme and have an identifier
+in their front matter (where relevant). Here we show how to create new
+notes that deviate from the default value of ~denote-file-type~, specify
+their own ~denote-directory~, and even tweak the file's front matter.
+
+Suppose you want to conform with the default of creating notes with the
+=.org= extension but, for whatever reason, wish to have a way to quickly
+produce a file with the =.md= extension and TOML-compliant front matter.
+
+#+begin_src emacs-lisp
+(setq denote-file-type nil)
+
+(defun my-denote-markdown-toml ()
+ (interactive)
+ (let ((denote-file-type 'markdown-toml))
+ (call-interactively #'denote)))
+#+end_src
+
+This principle can be taken a step further by ~let~ binding a second
+directory for those alternative notes. Maybe your standard notes are
+located in =~/Documents/notes/= but you plan to store those alternative
+notes in =~/blog/= ([[#h:337f9cf0-9f66-45af-b73f-f6370472fb51][Fontification
in Dired]]).
+
+#+begin_src emacs-lisp
+(setq denote-file-type nil)
+(setq denote-directory (expand-file-name "~/Documents/notes/"))
+
+(defun my-denote-markdown-toml ()
+ (interactive)
+ (let ((denote-file-type 'markdown-toml)
+ (denote-directory "~/blog/"))
+ (call-interactively #'denote)))
+#+end_src
+
+Given Denote's composable code, you can tweak the output however you
+like ([[#h:f69371d5-1843-493d-9ff5-c1ab3b43024e][Tweaking the front matter]]).
Consider the case where the
+alternative notes in the blog have no use for the identifier field
+inside the front matter. Let's omit it! (It will still be part of the
+file name.)
+
+#+begin_src emacs-lisp
+(setq denote-file-type nil)
+(setq denote-directory (expand-file-name "~/Documents/notes/"))
+
+;; Excerpt of the default:
+(defvar denote-toml-front-matter
+ "+++
+title = %S
+date = %s
+tags = %s
+identifier = %S
++++\n\n")
+
+;; Adding the N$ to show the order they are provided internally
+;; (explained in `denote-org-front-matter'),
+(defvar my-denote-toml-front-matter
+ "+++
+title = %1$S
+date = %2$s
+tags = %3$s
++++\n\n")
+
+(defun my-denote-markdown-toml ()
+ (interactive)
+ (let ((denote-file-type 'markdown-toml)
+ (denote-directory "~/blog/")
+ (denote-toml-front-matter my-denote-toml-front-matter))
+ (call-interactively #'denote)))
+#+end_src
+
+Have more ideas? Something does not work quite right? Areas you wish
+were more abstract in the code? Please participate in the development
+process.
+
* Renaming non-notes
:PROPERTIES:
:CUSTOM_ID: h:532e8e2a-9b7d-41c0-8f4b-3c5cbb7d4dca
- [elpa] externals/denote 739d485600 079/355: Fix bug about missing point in link de-duplication, (continued)
- [elpa] externals/denote 739d485600 079/355: Fix bug about missing point in link de-duplication, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 3df88a05d0 096/355: Make linking aware of file types (extends 299b897), ELPA Syncer, 2022/06/26
- [elpa] externals/denote e1bd4c9cb8 094/355: BREAKING Put keywords after the title, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 7366004e91 106/355: Fix markdown-toml front matter format, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 5fd4e97dad 105/355: Add support for markdown-toml, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 1a8b57a9a8 104/355: Fix const in denote-file-type (extends 2bc5df6), ELPA Syncer, 2022/06/26
- [elpa] externals/denote c225201c49 124/355: Use appropriate name for internal variable, ELPA Syncer, 2022/06/26
- [elpa] externals/denote a70b4cd32d 114/355: Refine backlinks' heading per file type, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 7cba33e08e 119/355: LAST BREAKING CHANGE to file-naming scheme, ELPA Syncer, 2022/06/26
- [elpa] externals/denote c5a5748594 116/355: Abstract plain text front matter delimiter, ELPA Syncer, 2022/06/26
- [elpa] externals/denote e394057985 134/355: Document how to store multiple types of notes,
ELPA Syncer <=
- [elpa] externals/denote d90695213c 151/355: Add minor clarifications in the manual, ELPA Syncer, 2022/06/26
- [elpa] externals/denote ce41b421ef 147/355: Update denote-retrieve symbols in denote-link, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 0e75e46b32 138/355: Improve denote-dired-rename-file, ELPA Syncer, 2022/06/26
- [elpa] externals/denote cdb7f554f2 160/355: Remove extra parenthesis from sample configuration, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 88e64be2cb 176/355: Fix plain text link format, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 7fab21926d 183/355: Process 'find' output in denote-retrieve, ELPA Syncer, 2022/06/26
- [elpa] externals/denote ecc7922a77 169/355: BREAKING remove support for hardcoded backlinks, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 49a2932d42 189/355: Implement denote-link-add-links, ELPA Syncer, 2022/06/26
- [elpa] externals/denote a7a0bf0255 207/355: Tweak doc string, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 2338ee4698 181/355: Refine how identifier is retrieved from file names, ELPA Syncer, 2022/06/26