Subject: bug#37887: 27.0.50; icalendar-export-region: multiline Desc not handled

From: Stefan Kangas <[email-masked]>
Date: Tue, 25 Aug 2020 16:43:28 -0700

Rajeev Narang <[email-masked]> writes:

> icalendar-export-region does not export multi-line Desc as it is imported by icalendar-import-file.  The following patch fixes the issue.
>
> diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
> index 1186ced3fb..1f4e582aa5 100644
> --- a/lisp/calendar/icalendar.el
> +++ b/lisp/calendar/icalendar.el
> @@ -1244,7 +1244,7 @@ icalendar--parse-summary-and-rest
>                       (concat "\\(" icalendar-import-format-uid "\\)??"))))
>  	;; Need the \' regexp in order to detect multi-line items
>          (setq s (concat "\\`"
> -                        (replace-regexp-in-string "%s" "\\(.*?\\)" s nil t)
> +                        (replace-regexp-in-string "%s" "\\([^z-a]*?\\)" s nil t)
>                          "\\'"))
>          (if (string-match s summary-and-rest)
>              (let (cla des loc org sta url uid) ;; sum

Could you please provide an example of how to reproduce this bug?

Best regards,
Stefan Kangas