branch: externals/denote
commit a0c7086ebd5da33c337b5cb3eef9af671d6ab72d
Author: Kierin Bell <ferns...@fernseed.me>
Commit: Kierin Bell <ferns...@fernseed.me>

    Fix type prompt in interactive form of 'denote-sequence-find-dired'
    
    The type is passed to 'denote-sequence-get-relative', which uses types
    that are slightly different than those in 'denote-sequence-types'.  Also
    update the error message displayed by 'denote-sequence-get-relative'
    when it receives an unrecognized type to reflect that it no longer uses
    the types from 'denote-sequence-types'.
---
 denote-sequence.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/denote-sequence.el b/denote-sequence.el
index e4a48765a2..30145a79b2 100644
--- a/denote-sequence.el
+++ b/denote-sequence.el
@@ -621,7 +621,7 @@ returned by `denote-sequence-get-all-files'."
                   (lambda (file)
                     (= (denote-sequence-depth (denote-sequence-file-p file)) 
(+ depth 1)))
                   (funcall filter-common '> sequence)))
-      (_ (error "The type `%s' is not among the `denote-sequence-types'" 
type)))))
+      (_ (error "The type `%s' is not among the allowed types" type)))))
 
 (defvar denote-sequence-type-history nil
   "Minibuffer history of `denote-sequence-type-prompt'.")
@@ -917,7 +917,13 @@ For a more specialised case, see 
`denote-sequence-find-relatives-dired'."
 (defun denote-sequence-find-dired (type)
   "Like `denote-sequence-find' for TYPE but put the matching files in Dired.
 Also see `denote-sequence-dired'."
-  (interactive (list (denote-sequence-type-prompt "Find relatives of TYPE")))
+  (interactive
+   (list (denote-sequence-type-prompt "Find relatives of TYPE"
+                                      '(all-parents
+                                        parent
+                                        siblings
+                                        all-children
+                                        children))))
   (if-let* ((sequence (denote-sequence-file-p buffer-file-name)))
       (if-let* ((default-directory (denote-directory))
                 (relatives (delete buffer-file-name 
(denote-sequence-get-relative sequence type)))

Reply via email to