Function: hywiki-page-read-new
hywiki-page-read-new is a byte-compiled function defined in hywiki.el.
Signature
(hywiki-page-read-new &optional PROMPT INITIAL)
Documentation
Prompt with completion for and return an existing/new HyWiki page name.
If point is on one, press RET immediately to use that one.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260822.1645/hywiki.el
(defun hywiki-page-read-new (&optional prompt initial)
"Prompt with completion for and return an existing/new HyWiki page name.
If point is on one, press RET immediately to use that one."
(let ((completion-ignore-case t)
(valid-p (lambda (input)
(let ((case-fold-search nil))
(string-match-p (concat "\\`" hywiki-word-regexp "\\'") input))))
(collection (hywiki-get-page-list)))
(completing-read
(if (stringp prompt) prompt "HyWiki Page: ")
(lambda (input pred action)
(if (eq action 'lambda)
;; Check that input matches `hyrolo-word-regexp'.
;; If so, RET will exit the minibuffer.
(funcall valid-p input)
;; Otherwise, complete over `collection'
(complete-with-action action collection input pred)))
nil t initial nil (hywiki-word-at-point))))