From: Robert Pluim <rpluim@gmail.com>
To: Reindert-Jan Ekker <info@codesensei.nl>
Cc: 64023@debbugs.gnu.org
Subject: bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty
Date: Mon, 12 Jun 2023 18:21:46 +0200 [thread overview]
Message-ID: <87jzw8hcrp.fsf@gmail.com> (raw)
In-Reply-To: <m1zg54y8l1.fsf@codesensei.nl> (Reindert-Jan Ekker's message of "Mon, 12 Jun 2023 17:48:27 +0200")
>>>>> On Mon, 12 Jun 2023 17:48:27 +0200, Reindert-Jan Ekker <info@codesensei.nl> said:
Reindert-Jan> This is because in gnus-icalendar--update-org-event, the code for
Reindert-Jan> updating the timestamp is inside "(when description ...)", causing it to
Reindert-Jan> only be run when the description is not empty.
I was sure Iʼd fixed this already, but that was in `gnus-icalendar-event->org-entry', not
`gnus-icalendar--update-org-event'
How does this work for you:
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index 0d776cd1bca..542e2a621a0 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -642,16 +642,16 @@ gnus-icalendar--update-org-event
(delete-region (point) entry-end))
;; put new event description in the entry body
- (when description
- (save-restriction
- (narrow-to-region (point) (point))
- (insert "\n"
- (gnus-icalendar-event:org-timestamp event)
- "\n\n"
- (replace-regexp-in-string "[\n]+$" "\n" description)
- "\n")
- (indent-region (point-min) (point-max) (1+ entry-outline-level))
- (fill-region (point-min) (point-max))))
+ (save-restriction
+ (narrow-to-region (point) (point))
+ (insert "\n"
+ (gnus-icalendar-event:org-timestamp event)
+ "\n\n"
+ (replace-regexp-in-string "[\n]+$" "\n"
+ (or description "No description"))
+ "\n")
+ (indent-region (point-min) (point-max) (1+ entry-outline-level))
+ (fill-region (point-min) (point-max)))
;; update entry properties
(cl-labels
Robert
--
next prev parent reply other threads:[~2023-06-12 16:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 15:48 bug#64023: 29.0.91; gnus-icalendar does not update timestamp when description is empty Reindert-Jan Ekker
2023-06-12 16:21 ` Robert Pluim [this message]
[not found] ` <m25y7sa6j0.fsf@codesensei.nl>
2023-06-13 10:48 ` Robert Pluim
2023-06-13 11:24 ` Eli Zaretskii
2023-06-13 12:45 ` Robert Pluim
[not found] ` <m2mt134lsg.fsf@codesensei.nl>
2023-06-13 12:51 ` Robert Pluim
2023-06-16 18:45 ` Reindert-Jan Ekker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jzw8hcrp.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=64023@debbugs.gnu.org \
--cc=info@codesensei.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.