branch: externals/consult-denote commit 99407f6844d15e4c0860629889a194a49d1387b1 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make consult-denote-file-prompt accent new optional argument This is how it is in denote.el as part of its current development target. Thanks to Kai von Fintel for identifying the problem in issue 15: <https://github.com/protesilaos/consult-denote/issues/15>. --- README.org | 3 ++- consult-denote.el | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index e47b14e112..adfa125c46 100644 --- a/README.org +++ b/README.org @@ -174,7 +174,8 @@ matters. + Author/maintainer :: Protesilaos Stavrou. + Ideas and/or user feedback :: Damien Cassou, Jeff Valk, Joost - Kremers, Peter Prevos, Samuel Flint, gitrh95, hapst3r. + Kremers, Kai von Fintel, Peter Prevos, Samuel Flint, gitrh95, + hapst3r. * COPYING :PROPERTIES: diff --git a/consult-denote.el b/consult-denote.el index c4d886ae4d..3a38958d67 100644 --- a/consult-denote.el +++ b/consult-denote.el @@ -106,7 +106,7 @@ ;;;; Functions -(defun consult-denote-file-prompt (&optional files-matching-regexp prompt-text no-require-match) +(defun consult-denote-file-prompt (&optional files-matching-regexp prompt-text no-require-match has-identifier) "A Consult-powered equivalent of `denote-file-prompt'. With optional FILES-MATCHING-REGEXP, filter the candidates per @@ -117,12 +117,15 @@ select a file. With optional NO-REQUIRE-MATCH, accept the given input as-is. +With optional HAS-IDENTIFIER, only show candidates that have an +identifier. + Return the absolute path to the matching file." (let* ((relative-files (mapcar #'denote-get-file-name-relative-to-denote-directory (denote-directory-files (or denote-file-prompt-use-files-matching-regexp files-matching-regexp) - :omit-current))) + :omit-current nil nil has-identifier))) (prompt (format "%s in %s: " (or prompt-text "Select FILE") (denote-directory))) (default-directory (denote-directory)) ; needed for the preview (input (consult--read