bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64023: 29.0.91; gnus-icalendar does not update timestamp when descri


From: Robert Pluim
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@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
-- 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]