* small change to fix gnus-icalendar to org export
@ 2019-04-14 12:15 Eric S Fraga
0 siblings, 0 replies; only message in thread
From: Eric S Fraga @ 2019-04-14 12:15 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]
The attached patch will fix gnus-icalendar-event->org-entry to export an
event with timestamp correctly when no description field has been
specified in the calendar event. A description field is optional so may
not be present.
This patch was suggested by Robert Pluim on the gnus mailing list. I've
tested it out on a couple of calendar invites and seems to work just
fine.
Thanks,
eric
--
Eric S Fraga via Emacs 27.0.50 & org 9.2.3 on Debian buster/sid
[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 991 bytes --]
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index 28020a1fd0..64cc3f92a9 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -480,14 +480,14 @@ gnus-icalendar--format-participant-list
(org-entry-put (point) (car prop) (cdr prop)))
props))
- (when description
- (save-restriction
- (narrow-to-region (point) (point))
- (insert (gnus-icalendar-event:org-timestamp event)
- "\n\n"
- description)
- (indent-region (point-min) (point-max) 2)
- (fill-region (point-min) (point-max))))
+ (save-restriction
+ (narrow-to-region (point) (point))
+ (insert (gnus-icalendar-event:org-timestamp event)
+ "\n\n")
+ (when description
+ (insert description))
+ (indent-region (point-min) (point-max) 2)
+ (fill-region (point-min) (point-max)))
(buffer-string))))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-04-14 12:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-14 12:15 small change to fix gnus-icalendar to org export Eric S Fraga
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.