[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote e2ba6c144d 16/20: Guard sorting keywords when gi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote e2ba6c144d 16/20: Guard sorting keywords when given an empty string |
Date: |
Wed, 20 Dec 2023 03:58:02 -0500 (EST) |
branch: externals/denote
commit e2ba6c144d376548c072c4f7f9452ad22b78bb57
Author: Ashton Wiersdorf <mail@wiersdorf.dev>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Guard sorting keywords when given an empty string
I've been using Denote with Transient. However, when `denote' is
invoked non-interactively (as through a transient prefix) and no
keywords are specified, the empty string gets passed to `sort', which
is an error.
I've made a file that can be used with the `elpaca-test' macro from
the excellent Elpaca package manager to reproduce the bug. I've added
it as a paste here:
https://paste.sr.ht/~ashton314/66e2fe76478542c745368e82a8eb5c14af38e448
---
denote.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/denote.el b/denote.el
index 89b2b276a3..a99d02de07 100644
--- a/denote.el
+++ b/denote.el
@@ -1031,7 +1031,7 @@ Return an empty string if the minibuffer input is empty."
(defun denote-keywords-sort (keywords)
"Sort KEYWORDS if `denote-sort-keywords' is non-nil.
KEYWORDS is a list of strings, per `denote-keywords-prompt'."
- (if denote-sort-keywords
+ (if (and (listp keywords) denote-sort-keywords)
(sort keywords #'string-collate-lessp)
keywords))
- [elpa] externals/denote f0910d3146 13/20: Add denote-menu-bar-mode, making the Denote menu bar optional, (continued)
- [elpa] externals/denote f0910d3146 13/20: Add denote-menu-bar-mode, making the Denote menu bar optional, ELPA Syncer, 2023/12/20
- [elpa] externals/denote 6e5ddc2623 01/20: Refactor denote-file-has-identifier-p and use it in various functions, ELPA Syncer, 2023/12/20
- [elpa] externals/denote faaf5f94ab 03/20: Use denote-rename-max-mini-window-height in denote-change-file-type-and-front-matter, ELPA Syncer, 2023/12/20
- [elpa] externals/denote e6b7ba74e6 05/20: Make denote-retrieve-filename-identifier consistent with other functions, ELPA Syncer, 2023/12/20
- [elpa] externals/denote f1730b7798 17/20: Acknowledge Ashton Wiersdorf for commit e2ba6c1, ELPA Syncer, 2023/12/20
- [elpa] externals/denote f26d8d7799 08/20: Handle nil case in denote-sort--define-lessp, ELPA Syncer, 2023/12/20
- [elpa] externals/denote 4899ca5c78 09/20: Remove separator for the last file in denote-org-dblock-add-files, ELPA Syncer, 2023/12/20
- [elpa] externals/denote 6acb25c7ec 10/20: Create aliases for denote-retrieve-front-matter-* functions, ELPA Syncer, 2023/12/20
- [elpa] externals/denote 195f0c3b7f 14/20: Acknowledge Joseph Turner for commits 4261d19, f0910d3, ELPA Syncer, 2023/12/20
- [elpa] externals/denote 3d4891b5dd 06/20: Rename denote-retrieve-title-* and denote-retrieve-keywords-* functions, ELPA Syncer, 2023/12/20
- [elpa] externals/denote e2ba6c144d 16/20: Guard sorting keywords when given an empty string,
ELPA Syncer <=
- [elpa] externals/denote ee58ae014d 20/20: Merge pull request #199 from jeanphilippegg/refactor, ELPA Syncer, 2023/12/20
- [elpa] externals/denote 2b627aaafd 11/20: Add denote-org-capture-with-prompts, ELPA Syncer, 2023/12/20