[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote aaa691aa15 020/355: Refine front-matter
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote aaa691aa15 020/355: Refine front-matter |
Date: |
Sun, 26 Jun 2022 23:57:56 -0400 (EDT) |
branch: externals/denote
commit aaa691aa156c3fa600d040a9f9ae9958c26ed161
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Refine front-matter
---
denote.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/denote.el b/denote.el
index bcd1c0f738..0795c14efa 100644
--- a/denote.el
+++ b/denote.el
@@ -253,8 +253,11 @@ TITLE, DATE, KEYWORDS, FILENAME, ID are all strings which
are
(concat "#+title: " title "\n"
"#+date: " date "\n"
"#+keywords: " kw "\n"
- "#+filename: " filename "\n"
- "#+identifier: " id "\n\n")))
+ "#+identifier: " id "\n"
+ "#+filename: " (string-remove-prefix denote-directory filename)
"\n"
+ "#+path: " filename "\n"
+ "#+link: " "denote /home/prot/Documents/notes/%s"
+ "\n\n")))
(defun denote--path (title keywords)
"Return path to new file with TITLE and KEYWORDS.
@@ -269,11 +272,11 @@ Format current time, else use optional ID."
(defun denote--prepare-note (title keywords &optional path)
"Use TITLE and KEYWORDS to prepare new note file.
Use optional PATH, else create it with `denote--path'."
- (let* ((filename (or path (denote--path title keywords)))
+ (let* ((path (or path (denote--path title keywords)))
(default-directory denote-directory)
- (buffer (unless path (find-file filename)))
+ (buffer (unless path (find-file path)))
(header (denote--file-meta-header
- title (format-time-string "%F") keywords filename
+ title (format-time-string "%F") keywords path
(format-time-string denote-id))))
(unless path
(with-current-buffer buffer (insert header))
- [elpa] externals/denote 3c06d7d119 005/355: Tweak front matter, (continued)
- [elpa] externals/denote 3c06d7d119 005/355: Tweak front matter, ELPA Syncer, 2022/06/26
- [elpa] externals/denote e9f5c69846 010/355: Placate the compiler, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 39d9870635 018/355: Change punct regexp location; make it defconst, ELPA Syncer, 2022/06/26
- [elpa] externals/denote dd488756f7 019/355: Refine denote--directory-files, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 0aab5bc835 012/355: Tweak code for the sake of org-capture, ELPA Syncer, 2022/06/26
- [elpa] externals/denote d90ea28d00 013/355: Update one-line description, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 0dd4700e32 014/355: Fix typo, ELPA Syncer, 2022/06/26
- [elpa] externals/denote c3674ff813 023/355: Fix typo, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 3790125482 027/355: Remove to-do, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 5744240289 036/355: Remove needless to-do, ELPA Syncer, 2022/06/26
- [elpa] externals/denote aaa691aa15 020/355: Refine front-matter,
ELPA Syncer <=
- [elpa] externals/denote 153827f6c8 021/355: Add denote-link, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 21104787f7 024/355: Put link functionality in denote-link.el, ELPA Syncer, 2022/06/26
- [elpa] externals/denote b951a62245 025/355: Put capture code in denote-org-capture.el, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 9f4a99243c 035/355: Change how org-capture hook is added, ELPA Syncer, 2022/06/26
- [elpa] externals/denote fa6a3315dc 047/355: Add correct group for org capture specifiers, ELPA Syncer, 2022/06/26
- [elpa] externals/denote f33f8a7040 053/355: Rewrite README as a manual, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 251b35d8f5 003/355: Add GPL, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 2aed386b84 006/355: Add denote-org-capture (WORK-IN-PROGRESS), ELPA Syncer, 2022/06/26
- [elpa] externals/denote 0e2cc10fe6 009/355: Improve integration with org-capture-templates, ELPA Syncer, 2022/06/26
- [elpa] externals/denote 1079beb858 017/355: Add todo about file deletion post org-capture, ELPA Syncer, 2022/06/26