GNU bug report logs - #64023
29.0.91; gnus-icalendar does not update timestamp when description is empty

Previous Next

Package: emacs;

Reported by: Reindert-Jan Ekker <info <at> codesensei.nl>

Date: Mon, 12 Jun 2023 16:10:02 UTC

Severity: normal

Tags: fixed

Found in version 29.0.91

Fixed in version 30.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Reindert-Jan Ekker <info <at> codesensei.nl>
Cc: 64023 <at> 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
>>>>> On Mon, 12 Jun 2023 17:48:27 +0200, Reindert-Jan Ekker <info <at> 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
-- 




This bug report was last modified 2 years and 26 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.