[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 49c4e4e094 1/7: Simplify denote--format-file
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 49c4e4e094 1/7: Simplify denote--format-file |
Date: |
Tue, 2 Aug 2022 23:57:30 -0400 (EDT) |
branch: externals/denote
commit 49c4e4e0940f42fbe959e05c801db1a02f96b604
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Simplify denote--format-file
---
denote.el | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/denote.el b/denote.el
index 48043d83ee..1905266afa 100644
--- a/denote.el
+++ b/denote.el
@@ -639,16 +639,12 @@ which include the starting dot or the return value of
`denote--file-extension'."
(let ((kws (denote--keywords-combine keywords))
(ext (or extension (denote--file-extension)))
- (empty-title (string-empty-p title-slug)))
- (cond
- ((and keywords title-slug (not empty-title))
- (format "%s%s--%s__%s%s" path id title-slug kws ext))
- ((and keywords empty-title)
- (format "%s%s__%s%s" path id kws ext))
- ((and title-slug (not empty-title))
- (format "%s%s--%s%s" path id title-slug ext))
- (t
- (format "%s%s%s" path id ext)))))
+ (file-name (concat path id)))
+ (when (and title-slug (not (string-empty-p title-slug)))
+ (setq file-name (concat file-name "--" title-slug)))
+ (when keywords
+ (setq file-name (concat file-name "__" kws)))
+ (concat file-name ext)))
(defun denote--format-markdown-keywords (keywords)
"Quote, downcase, and comma-separate elements in KEYWORDS."
- [elpa] externals/denote updated (aabc3abdd3 -> c3df0d6575), ELPA Syncer, 2022/08/02
- [elpa] externals/denote 49c4e4e094 1/7: Simplify denote--format-file,
ELPA Syncer <=
- [elpa] externals/denote 3284762918 4/7: Simplify denote--directory-files-matching-regexp, ELPA Syncer, 2022/08/02
- [elpa] externals/denote 5c95a56bf4 6/7: Ignore return value of denote--barf-duplicate-id, ELPA Syncer, 2022/08/02
- [elpa] externals/denote 9ea59c442b 2/7: Simplify denote--retrieve-files-in-output, ELPA Syncer, 2022/08/02
- [elpa] externals/denote e01cdf4123 3/7: Use file-name-base, ELPA Syncer, 2022/08/02
- [elpa] externals/denote c3df0d6575 7/7: Merge pull request #73 from jeanphilippegg/cleanup, ELPA Syncer, 2022/08/02
- [elpa] externals/denote 4a95695d52 5/7: Simplify denote-link--map-over-notes, ELPA Syncer, 2022/08/02