Function: denote-open-or-create

denote-open-or-create is an autoloaded, interactive and byte-compiled function defined in denote.el.

Signature

(denote-open-or-create TARGET)

Documentation

Visit TARGET file in variable denote-directory(var)/denote-directory(fun).

If file does not exist, invoke denote to create a file. In that case, use the last input at the file prompt as the default value of the title prompt.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
;;;;; Other convenience commands

;;;###autoload
(defun denote-open-or-create (target)
  "Visit TARGET file in variable `denote-directory'.
If file does not exist, invoke `denote' to create a file.  In that case,
use the last input at the file prompt as the default value of the title
prompt."
  (interactive (list (denote-file-prompt nil "Select file (RET on no match to create it)" :no-require-match)))
  (if (and target (file-exists-p target))
      (find-file target)
    (denote--command-with-features #'denote :use-last-input-as-def-title nil nil nil)))