From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: emacs-devel@gnu.org
Subject: small change to fix gnus-icalendar to org export
Date: Sun, 14 Apr 2019 13:15:11 +0100 [thread overview]
Message-ID: <87v9zgvl4g.fsf@ucl.ac.uk> (raw)
[-- 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))))
reply other threads:[~2019-04-14 12:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9zgvl4g.fsf@ucl.ac.uk \
--to=e.fraga@ucl.ac.uk \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.