Function: denote-open-or-create

denote-open-or-create is an interactive and natively 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

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/yld6spsps5sfn9w4rjyhkvqlvdgsmvpq-emacs-packages-deps/share/emacs/site-lisp/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)))