-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make front matter variables "public"
By removing the double hyphens, we indicate that these variables can be relied upon by the user. In other words: these are hidden customisation options for those who want to maintain some Do-It-Yourself code.
- Loading branch information
1 parent
254a6cd
commit 73dc07a
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -368,7 +368,7 @@ treatment)." | |
('toml (format "[%S]" (downcase keywords))) | ||
(_ (downcase keywords)))))) | ||
|
||
(defvar denote--tml-front-matter | ||
(defvar denote-tml-front-matter | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kaushalmodi
Contributor
|
||
"+++ | ||
title = %S | ||
date = %s | ||
|
@@ -377,7 +377,7 @@ identifier = %S | |
+++\n\n" | ||
"TOML front matter value for `format'.") | ||
|
||
(defvar denote--yaml-front-matter | ||
(defvar denote-yaml-front-matter | ||
"--- | ||
title: %S | ||
date: %s | ||
|
@@ -386,15 +386,15 @@ identifier: %S | |
---\n\n" | ||
"YAML front matter value for `format'.") | ||
|
||
(defvar denote--text-front-matter | ||
(defvar denote-text-front-matter | ||
"title: %s | ||
date: %s | ||
tags: %s | ||
identifier: %s | ||
%s\n\n" | ||
"Plain text front matter value for `format'.") | ||
|
||
(defvar denote--org-front-matter | ||
(defvar denote-org-front-matter | ||
"#+title: %s | ||
#+date: %s | ||
#+filetags: %s | ||
|
@@ -410,10 +410,10 @@ TITLE, DATE, KEYWORDS, FILENAME, ID are all strings which are | |
(let ((kw-space (denote--file-meta-keywords keywords)) | ||
(kw-toml (denote--file-meta-keywords keywords 'toml))) | ||
(pcase denote-file-type | ||
('markdown-toml (format denote--tml-front-matter title date kw-toml id)) | ||
('markdown-yaml (format denote--yaml-front-matter title date kw-space id)) | ||
('text (format denote--text-front-matter title date kw-space id (make-string 27 ?-))) | ||
(_ (format denote--org-front-matter title date kw-space id))))) | ||
('markdown-toml (format denote-tml-front-matter title date kw-toml id)) | ||
('markdown-yaml (format denote-yaml-front-matter title date kw-space id)) | ||
('text (format denote-text-front-matter title date kw-space id (make-string 27 ?-))) | ||
(_ (format denote-org-front-matter title date kw-space id))))) | ||
|
||
(defun denote--path (title keywords) | ||
"Return path to new file with TITLE and KEYWORDS. | ||
|
Now that this variable is made public, can you please replace "tml" to "toml" for better searchability?