[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 414b6d51d0 2/5: Add denote-sort-get-files
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 414b6d51d0 2/5: Add denote-sort-get-files |
Date: |
Fri, 1 Dec 2023 09:57:44 -0500 (EST) |
branch: externals/denote
commit 414b6d51d0d37280cd79717c6d7731edc388b073
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add denote-sort-get-files
This is like denote-add-links but with the sorting feature on top.
---
denote-sort.el | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/denote-sort.el b/denote-sort.el
index 8cd6ff9660..d8855ea3c8 100644
--- a/denote-sort.el
+++ b/denote-sort.el
@@ -126,6 +126,31 @@ With optional REVERSE as a non-nil value, reverse the sort
order."
sort-by-component
reverse))
+(defun denote-sort-get-links (files-matching-regexp sort-by-component
current-file-type id-only &optional reverse)
+ "Return sorted typographic list of links for FILES-MATCHING-REGEXP.
+
+With FILES-MATCHING-REGEXP as a string, match files stored in the
+variable `denote-directory'.
+
+With SORT-BY-COMPONENT as a symbol among `denote-sort-components',
+sort FILES-MATCHING-REGEXP by the given Denote file name
+component. If SORT-BY-COMPONENT is nil or an unknown non-nil
+value, default to the identifier-based sorting.
+
+With CURRENT-FILE-TYPE as a symbol among those specified in
+`denote-file-type' (or the `car' of each element in
+`denote-file-types'), format the link accordingly. With a nil or
+unknown non-nil value, default to the Org notation.
+
+With ID-ONLY as a non-nil value, produce links that consist only
+of the identifier, thus deviating from CURRENT-FILE-TYPE.
+
+With optional REVERSE as a non-nil value, reverse the sort order."
+ (denote-link--prepare-links
+ (denote-sort-get-directory-files files-matching-regexp sort-by-component
reverse)
+ current-file-type
+ id-only))
+
(defvar denote-sort--files-matching-regexp-hist nil
"Minibuffer history of `denote-sort--files-matching-regexp-prompt'.")
- [elpa] externals/denote updated (6c6ffb3d8a -> 341bd586a6), ELPA Syncer, 2023/12/01
- [elpa] externals/denote 414b6d51d0 2/5: Add denote-sort-get-files,
ELPA Syncer <=
- [elpa] externals/denote 62bb9e3188 4/5: Add work-in-progress sort capability of 'denote-links' Org dynamic block, ELPA Syncer, 2023/12/01
- [elpa] externals/denote c5c0132f4c 1/5: Add denote-link--insert-links helper function, ELPA Syncer, 2023/12/01
- [elpa] externals/denote 341bd586a6 5/5: Add no-sort parameter to denote-link--prepare-links, denote-link--insert-links, ELPA Syncer, 2023/12/01
- [elpa] externals/denote 2f5b4ee97d 3/5: Abstract let bound code into its own function in denote-org-dblock.el, ELPA Syncer, 2023/12/01