[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 38173af 2/2: Respect remember-save-after-remembering on remember-

From: Lars Ingebrigtsen
Subject: master 38173af 2/2: Respect remember-save-after-remembering on remember-diary-extract-entries
Date: Wed, 20 Jan 2021 11:55:22 -0500 (EST)

branch: master
commit 38173af10df67cb36521cdcc2f1f42103d67de98
Author: Gabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Respect remember-save-after-remembering on remember-diary-extract-entries
    * lisp/textmodes/remember.el (remember-diary-extract-entries):
    Save automatically if `remember-save-after-remembering' is non-nil
 lisp/textmodes/remember.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 6c94f8d..7f10797 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -559,7 +559,10 @@ If this is nil, then `diary-file' will be used instead."
         (push (remember-diary-convert-entry (match-string 1)) list))
       (when list
         (diary-make-entry (mapconcat 'identity list "\n")
-                          nil remember-diary-file))
+                          nil remember-diary-file)
+        (when remember-save-after-remembering
+          (with-current-buffer (find-buffer-visiting diary-file)
+            (save-buffer))))
       nil))) ;; Continue processing
 ;;; Internal Functions:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]