Fix default selection when there's only one candidate
This commit is contained in:
parent
a450dcda8c
commit
5b2b3b78de
|
@ -792,7 +792,7 @@ Based on an answer at the [[https://emacs.stackexchange.com/a/77480/34645][Emacs
|
|||
(let* ((prompt (format-prompt "URL" ""))
|
||||
(candidate-urls (-non-nil (mapcar #'funcall my/denote/url-functions)))
|
||||
(url (if (eql 1 (length candidate-urls))
|
||||
(read-string prompt (car candidate-urls))
|
||||
(read-string prompt (caar candidate-urls))
|
||||
(completing-read prompt candidate-urls))))
|
||||
|
||||
;; `candidate-urls' is a mix of strings and cons
|
||||
|
|
|
@ -60,7 +60,7 @@ looking at the <title> tags."
|
|||
(let* ((prompt (format-prompt "URL" ""))
|
||||
(candidate-urls (-non-nil (mapcar #'funcall my/denote/url-functions)))
|
||||
(url (if (eql 1 (length candidate-urls))
|
||||
(read-string prompt (car candidate-urls))
|
||||
(read-string prompt (caar candidate-urls))
|
||||
(completing-read prompt candidate-urls))))
|
||||
|
||||
;; `candidate-urls' is a mix of strings and cons
|
||||
|
|
Loading…
Reference in New Issue