Function: denote--keywords-crm

denote--keywords-crm is a byte-compiled function defined in denote.el.

Signature

(denote--keywords-crm KEYWORDS &optional PROMPT INITIAL)

Documentation

Use completing-read-multiple for KEYWORDS.

With optional PROMPT, use it instead of a generic text for file keywords. With optional INITIAL, add it to the minibuffer as initial input.

When denote-infer-keywords is nil, pass REQUIRE-MATCH to the completion prompt. Otherwise, use nil for that parameter.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote--keywords-crm (keywords &optional prompt initial)
  "Use `completing-read-multiple' for KEYWORDS.
With optional PROMPT, use it instead of a generic text for file
keywords.  With optional INITIAL, add it to the minibuffer as
initial input.

When `denote-infer-keywords' is nil, pass REQUIRE-MATCH to the
completion prompt.  Otherwise, use nil for that parameter."
  (let* ((restricted-p (null denote-infer-keywords))
         (initial-prompt (or prompt "New file KEYWORDS"))
         (final-prompt (if restricted-p
                           (format "%s %s" initial-prompt
                                   (propertize "(controlled vocabulary)" 'face 'denote-faces-prompt-current-name))
                         initial-prompt)))
    (delete-dups
     (completing-read-multiple
      (format-prompt final-prompt nil)
      keywords nil restricted-p initial 'denote-keyword-history))))