[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 5a53344bbd 09/12: Make denote-save-buffer-after-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 5a53344bbd 09/12: Make denote-save-buffer-after-creation a user option and document it |
Date: |
Thu, 15 Feb 2024 00:58:22 -0500 (EST) |
branch: externals/denote
commit 5a53344bbdee6400baaa203b44778c75318cd8c9
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make denote-save-buffer-after-creation a user option and document it
---
README.org | 20 ++++++++++++++++++++
denote.el | 19 +++++++++++++++----
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index 303018be0b..06d5b9c08a 100644
--- a/README.org
+++ b/README.org
@@ -493,6 +493,25 @@ variants which you can then assign to keys, invoke with
=M-x=, or add
to the list of commands available at the ~denote-command-prompt~
([[#h:98c732ac-da0e-4ebd-a0e3-5c47f9075e51][Choose which commands to prompt
for]]).
+*** The ~denote-save-buffer-after-creation~ option
+:PROPERTIES:
+:CUSTOM_ID: h:bf80f4cd-6f56-4f7c-a991-8573161e4511
+:END:
+
+[ Part of {{{development-version}}}. ]
+
+#+vindex: denote-save-buffer-after-creation
+The user option ~denote-save-buffer-after-creation~ controls whether
+commands that creeate new notes save their buffer outright.
+
+The default behaviour of commands such as ~denote~ (or related) is to
+not save the buffer they create
([[#h:17896c8c-d97a-4faa-abf6-31df99746ca6][Points of entry]]). This gives the
user
+the chance to review the text before writing it to a file. The user
+may choose to delete the unsaved buffer, thus not creating a new note.
+
+If ~denote-save-buffer-after-creation~ is set to a non-nil value, such
+buffers are saved automatically.
+
*** The ~denote-date-prompt-use-org-read-date~ option
:PROPERTIES:
:CUSTOM_ID: h:e7ef08d6-af1b-4ab3-bb00-494a653e6d63
@@ -3755,6 +3774,7 @@ Everything is in place to set up the package.
;; Remember to check the doc strings of those variables.
(setq denote-directory (expand-file-name "~/Documents/notes/"))
+(setq denote-save-buffer-after-creation nil)
(setq denote-known-keywords '("emacs" "philosophy" "politics" "economics"))
(setq denote-infer-keywords t)
(setq denote-sort-keywords t)
diff --git a/denote.el b/denote.el
index a197b133f5..d60c865a76 100644
--- a/denote.el
+++ b/denote.el
@@ -140,6 +140,21 @@ the function `denote-directory' instead."
:link '(info-link "(denote) Maintain separate directories for notes")
:type 'directory)
+(defcustom denote-save-buffer-after-creation4 nil
+ "Control whether commands that creeate new notes save their buffer outright.
+
+The default behaviour of commands such as `denote' (or related)
+is to not save the buffer they create. This gives the user the
+chance to review the text before writing it to a file. The user
+may choose to delete the unsaved buffer, thus not creating a new
+note.
+
+If this user option is set to a non-nil value, such buffers are
+saved automatically."
+ :group 'denote
+ :package-version '(denote . "3.0.0")
+ :type 'boolean)
+
(defcustom denote-known-keywords
'("emacs" "philosophy" "politics" "economics")
"List of strings with predefined keywords for `denote'.
@@ -1953,10 +1968,6 @@ prompted for a title. When this variable is non-nil, the
`denote' command ignores the region. This variable is useful in
commands that have their own way of handling the region.")
-;; NOTE 2024-01-13: This is a candidate for a user option.
-(defvar denote-save-buffer-after-creation nil
- "If non-nil, the buffer is saved at the end of the `denote' command.")
-
(defvar denote-title-prompt-current-default nil
"Currently bound default title for `denote-title-prompt'.
Set the value of this variable within the lexical scope of a
- [elpa] externals/denote updated (127c9a38a8 -> b82da20d5d), ELPA Syncer, 2024/02/15
- [elpa] externals/denote edac33337c 01/12: Avoid keeping opened buffers in `denote-link-return-links`, ELPA Syncer, 2024/02/15
- [elpa] externals/denote 13a64f7709 02/12: Merge branch 'protesilaos:main' into main, ELPA Syncer, 2024/02/15
- [elpa] externals/denote 2f122d374f 03/12: Merge pull request #252 from mattyonweb/main, ELPA Syncer, 2024/02/15
- [elpa] externals/denote f978dd746d 04/12: Acknowledge mattyonweb for commit edac333, ELPA Syncer, 2024/02/15
- [elpa] externals/denote 969367db4b 06/12: Update the documentation of the user option denote-rename-no-confirm, ELPA Syncer, 2024/02/15
- [elpa] externals/denote 1646c43bc3 05/12: Make denote-keywords-{add, remove} honour denote-rename-no-confirm, ELPA Syncer, 2024/02/15
- [elpa] externals/denote 6035d777cd 07/12: Update the documentation of denote-after-new-note-hook, ELPA Syncer, 2024/02/15
- [elpa] externals/denote 489e59e61c 08/12: Move denote-keywords-{add, remove} where the renaming commands are, ELPA Syncer, 2024/02/15
- [elpa] externals/denote 5a53344bbd 09/12: Make denote-save-buffer-after-creation a user option and document it,
ELPA Syncer <=
- [elpa] externals/denote 79e5ec02d3 11/12: Update the documentation of denote-keywords-{add,remove}; group as "rename", ELPA Syncer, 2024/02/15
- [elpa] externals/denote b82da20d5d 12/12: Clarify that all convenience commands append to the denote-prompts, ELPA Syncer, 2024/02/15
- [elpa] externals/denote c6ef5ec335 10/12: Define aliases for denote-keywords-{add, remove}, ELPA Syncer, 2024/02/15