Function: denote--command-with-features
denote--command-with-features is a byte-compiled function defined in
denote.el.
Signature
(denote--command-with-features COMMAND FORCE-USE-FILE-PROMPT-AS-DEFAULT-TITLE FORCE-IGNORE-REGION FORCE-SAVE IN-BACKGROUND)
Documentation
Execute file-creating COMMAND with specified features.
COMMAND is the symbol of a file-creating command to call, such as
denote or denote-signature.
With non-nil FORCE-USE-FILE-PROMPT-AS-DEFAULT-TITLE, use the last item
of denote-file-history as the default title of the title prompt. This
is useful in a command such as denote-link where the entry of the file
prompt can be reused as the default title.
With non-nil FORCE-IGNORE-REGION, ignore the region when creating the
note: do not use its text as the initial title in a title prompt. Else,
do whatever denote-ignore-region-in-denote-command entails.
With non-nil FORCE-SAVE, save the file at the end of the note creation.
Else, do whatever the value of denote-save-buffers entails.
With non-nil IN-BACKGROUND, create the note in the background: do not display the note's buffer after it is created.
Note that if all parameters except COMMAND are nil, this is
equivalent to (call-interactively command).
Return the path of the newly created file.
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote--command-with-features (command force-use-file-prompt-as-default-title force-ignore-region force-save in-background)
"Execute file-creating COMMAND with specified features.
COMMAND is the symbol of a file-creating command to call, such as
`denote' or `denote-signature'.
With non-nil FORCE-USE-FILE-PROMPT-AS-DEFAULT-TITLE, use the last item
of `denote-file-history' as the default title of the title prompt. This
is useful in a command such as `denote-link' where the entry of the file
prompt can be reused as the default title.
With non-nil FORCE-IGNORE-REGION, ignore the region when creating the
note: do not use its text as the initial title in a title prompt. Else,
do whatever `denote-ignore-region-in-denote-command' entails.
With non-nil FORCE-SAVE, save the file at the end of the note creation.
Else, do whatever the value of `denote-save-buffers' entails.
With non-nil IN-BACKGROUND, create the note in the background: do not
display the note's buffer after it is created.
Note that if all parameters except COMMAND are nil, this is
equivalent to `(call-interactively command)'.
Return the path of the newly created file."
(let ((denote-save-buffers
(or force-save denote-save-buffers))
(denote-ignore-region-in-denote-command
(or force-ignore-region denote-ignore-region-in-denote-command))
(denote-title-prompt-current-default
(if force-use-file-prompt-as-default-title
denote-file-prompt-latest-input
denote-title-prompt-current-default))
(path))
(if in-background
(save-window-excursion
(setq path (call-interactively command)))
(setq path (call-interactively command)))
path))