]> git.eshelyaron.com Git - emacs.git/commitdiff
Respect remember-save-after-remembering on remember-diary-extract-entries
authorGabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br>
Wed, 20 Jan 2021 16:54:43 +0000 (17:54 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 20 Jan 2021 16:54:43 +0000 (17:54 +0100)
* lisp/textmodes/remember.el (remember-diary-extract-entries):
Save automatically if `remember-save-after-remembering' is non-nil
(bug#45811).

lisp/textmodes/remember.el

index 6c94f8d03c816eaf6a9875692afc835e3e5578e2..7f107977d533810ff43fefc799975b741ad180ca 100644 (file)
@@ -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: