Function: gnus-icalendar-event-from-buffer

gnus-icalendar-event-from-buffer is a byte-compiled function defined in gnus-icalendar.el.gz.

Signature

(gnus-icalendar-event-from-buffer BUF &optional ATTENDEE-NAME-OR-EMAIL)

Documentation

Parse RFC5545 iCalendar in buffer BUF and return an event object.

Return a gnus-icalendar-event object representing the first event contained in the invitation. Return nil for calendars without an event entry.

ATTENDEE-NAME-OR-EMAIL is a list of strings that will be matched against the event's attendee names and emails. Invitation rsvp status will be retrieved from the first matching attendee record.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-icalendar.el.gz
(defun gnus-icalendar-event-from-buffer (buf &optional attendee-name-or-email)
  "Parse RFC5545 iCalendar in buffer BUF and return an event object.

Return a gnus-icalendar-event object representing the first event
contained in the invitation.  Return nil for calendars without an
event entry.

ATTENDEE-NAME-OR-EMAIL is a list of strings that will be matched
against the event's attendee names and emails.  Invitation rsvp
status will be retrieved from the first matching attendee record."
  (let ((ical (with-current-buffer (icalendar--get-unfolded-buffer (get-buffer buf))
                (goto-char (point-min))
                (icalendar--read-element nil nil))))

    (when ical
      (gnus-icalendar-event-from-ical ical attendee-name-or-email))))