From daf7902ed9dd1df186425149c8c5fa782a820afc Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 13 Jun 2023 14:37:53 +0200 Subject: [PATCH] Insert timestamp when converting icalendar to org event * lisp/gnus/gnus-icalendar.el (gnus-icalendar--update-org-event): Insert the timestamp even if the description is empty. (Bug#64023) --- lisp/gnus/gnus-icalendar.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index adbc39547ff..b0efe689636 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -642,16 +642,16 @@ is searched." (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 -- 2.39.2