unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries
@ 2021-01-12  4:21 Gabriel do Nascimento Ribeiro
  2021-01-12 14:26 ` Lars Ingebrigtsen
  2021-01-20 16:54 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 6+ messages in thread
From: Gabriel do Nascimento Ribeiro @ 2021-01-12  4:21 UTC (permalink / raw)
  To: 45811

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Respect-remember-save-after-remembering-on-remember-.patch --]
[-- Type: text/x-diff, Size: 1058 bytes --]

From aa305cc45029387cba0de9ee00a4b58e1b022104 Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br>
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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries
  2021-01-12  4:21 bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries Gabriel do Nascimento Ribeiro
@ 2021-01-12 14:26 ` Lars Ingebrigtsen
  2021-01-12 19:05   ` Gabriel do Nascimento Ribeiro
  2021-01-20 16:54 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-12 14:26 UTC (permalink / raw)
  To: Gabriel do Nascimento Ribeiro; +Cc: 45811

This (and the other two patches) to remember.el look good to me, but are
too large (in total) to be applied without assigning the copyright for
the changes to the FSF.  Would you be willing to sign such paperwork?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries
  2021-01-12 14:26 ` Lars Ingebrigtsen
@ 2021-01-12 19:05   ` Gabriel do Nascimento Ribeiro
  2021-01-12 19:26     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Gabriel do Nascimento Ribeiro @ 2021-01-12 19:05 UTC (permalink / raw)
  To: 45811

Lars Ingebrigtsen <larsi@gnus.org> writes:

> This (and the other two patches) to remember.el look good to me, but are
> too large (in total) to be applied without assigning the copyright for
> the changes to the FSF.  Would you be willing to sign such paperwork?

Yes, sure! Just send me the paperwork and the instructions on how to
sign it.

Thank you.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries
  2021-01-12 19:05   ` Gabriel do Nascimento Ribeiro
@ 2021-01-12 19:26     ` Lars Ingebrigtsen
  2021-01-20  0:12       ` Gabriel do Nascimento Ribeiro
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-12 19:26 UTC (permalink / raw)
  To: Gabriel do Nascimento Ribeiro; +Cc: 45811

Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> This (and the other two patches) to remember.el look good to me, but are
>> too large (in total) to be applied without assigning the copyright for
>> the changes to the FSF.  Would you be willing to sign such paperwork?
>
> Yes, sure! Just send me the paperwork and the instructions on how to
> sign it.

Great!

Here's how to get started:

Please email the following information to assign@gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]

[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]

[For the copyright registration, what country are you a citizen of?]

[What year were you born?]

[Please write your email address here.]

[Please write your postal address here.]

[Which files have you changed so far, and which new files have you written
so far?]





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries
  2021-01-12 19:26     ` Lars Ingebrigtsen
@ 2021-01-20  0:12       ` Gabriel do Nascimento Ribeiro
  0 siblings, 0 replies; 6+ messages in thread
From: Gabriel do Nascimento Ribeiro @ 2021-01-20  0:12 UTC (permalink / raw)
  To: 45811

Hi Lars,

My assignment/disclaimer process with the FSF is concluded.

Regards,
Gabriel





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries
  2021-01-12  4:21 bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries Gabriel do Nascimento Ribeiro
  2021-01-12 14:26 ` Lars Ingebrigtsen
@ 2021-01-20 16:54 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-20 16:54 UTC (permalink / raw)
  To: Gabriel do Nascimento Ribeiro; +Cc: 45811

Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com> writes:

> 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.

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-20 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12  4:21 bug#45811: 28.0.50; [PATCH] Respect remember-save-after-remembering on remember-diary-extract-entries Gabriel do Nascimento Ribeiro
2021-01-12 14:26 ` Lars Ingebrigtsen
2021-01-12 19:05   ` Gabriel do Nascimento Ribeiro
2021-01-12 19:26     ` Lars Ingebrigtsen
2021-01-20  0:12       ` Gabriel do Nascimento Ribeiro
2021-01-20 16:54 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).