Subject: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries

From: Gabriel do Nascimento Ribeiro <[email-masked]>
Date: Tue, 12 Jan 2021 01:21:50 -0300

On remember.el, when option 'remember-handler-functions' contains
handler 'remember-diary-extract-entries', entries will be appended to
Diary file. However, the Diary file will not be saved automatically. I
could not find any documentation describing if this behavior is
expected, and the docstring for 'remember-save-after-remembering' does
not mention how the Diary file should be handled in this case. Given
that, there is a patch attached to automatically save the Diary file
when option 'remember-save-after-remembering' is 't'. If this is the
wrong behavior, we could improve the improve the docstring or show the
Diary buffer to user after data is appended.

>From aa305cc45029387cba0de9ee00a4b58e1b022104 Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <[email-masked]>
Date: Tue, 12 Jan 2021 01:11:26 -0300
Subject: [PATCH] Respect remember-save-after-remembering on
 remember-diary-extract-entries

---
 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 98d3a3856e..911523fb47 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -542,7 +542,10 @@ remember-diary-extract-entries
         (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:
-- 
2.27.0