summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.org2
-rw-r--r--gnus-icalendar-request.el14
2 files changed, 6 insertions, 10 deletions
diff --git a/README.org b/README.org
index 050d1f2..6cebc33 100644
--- a/README.org
+++ b/README.org
@@ -15,7 +15,7 @@ Extension of gnus-icalendar to format icalendar event requests based on [[https:
- [ ] Updating event time ::
** Code TODOs
-- [ ] Cleanup description creation
+- [X] Cleanup description creation
- [ ] Check attendee capturing from email ~From~ header.
- [ ] Based on insertion method remove the multipart section or switch ~multipart/alternative~ if ~text/plain~ contains the same data as the ~text/calendar~ part.
- [ ] Split default attendee line format into a ~defvar~ in ~gnus-icalendar--format-attendee~.
diff --git a/gnus-icalendar-request.el b/gnus-icalendar-request.el
index 95256bd..4711be1 100644
--- a/gnus-icalendar-request.el
+++ b/gnus-icalendar-request.el
@@ -51,16 +51,12 @@ role."
(with-slots (summary description location organizer recur uid start-time end-time req-participants opt-participants) event
(let ((dtstamp (format-time-string "DTSTAMP:%Y%m%dT%H%M%SZ" nil t)) ;; current UTC time
(summary (format "SUMMARY:%s" summary))
- (description (when (and (stringp description) (not (string-empty-p description)))
+ (description (when (and (stringp description)
+ (not (string-empty-p description)))
(format "DESCRIPTION:%s"
- (with-temp-buffer
- (insert description)
- (beginning-of-buffer)
- (while (re-search-forward "\n" nil t)
- (replace-match "\\n" t t))
- (buffer-string))))) ;; TODO: How to do this properly?
- (dtstart (format-time-string "DTSTART:%Y%m%dT%H%M%SZ" start-time t)) ;; start-time in UTC
- (dtend (format-time-string "DTEND:%Y%m%dT%H%M%SZ" end-time t)) ;; end-time in UTC
+ (string-replace "\n" "\\n" description))))
+ (dtstart (format-time-string "DTSTART:%Y%m%dT%H%M%SZ" start-time t)) ;; in UTC -> suffix "Z"
+ (dtend (format-time-string "DTEND:%Y%m%dT%H%M%SZ" end-time t))
(attendee (gnus-icalendar--create-attendee-list req-participants opt-participants))
(location (when (and (stringp location) (not (string-empty-p location)))
(format "LOCATION:%s" location)))