Function: diary-icalendar-parse-attendees-and-organizer
diary-icalendar-parse-attendees-and-organizer is a byte-compiled
function defined in diary-icalendar.el.gz.
Signature
(diary-icalendar-parse-attendees-and-organizer)
Documentation
Parse icalendar-attendee and icalendar-organizer nodes from entry.
Searches the entry in the current restriction for addresses matching
diary-icalendar-address-regexp. If an address is found on a
line that also matches diary-icalendar-organizer-regexp, it will be
parsed as an icalendar-organizer node, or otherwise as an
icalendar-attendee. Returns the list of nodes for all addresses found.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/diary-icalendar.el.gz
;;; Export utility functions
(defun di:parse-attendees-and-organizer ()
"Parse `icalendar-attendee' and `icalendar-organizer' nodes from entry.
Searches the entry in the current restriction for addresses matching
`diary-icalendar-address-regexp'. If an address is found on a
line that also matches `diary-icalendar-organizer-regexp', it will be
parsed as an `icalendar-organizer' node, or otherwise as an
`icalendar-attendee'. Returns the list of nodes for all addresses found."
(goto-char (point-min))
(let (attendees organizer)
(while (re-search-forward di:address-regexp nil t)
(let ((addr (match-string 1))
(cn (match-string 2)))
(unless (string-match ":" addr) ; URI scheme already present
(setq addr (concat "mailto:" addr)))
(when cn
(setq cn (ical:trimp cn)))
(if (string-match di:organizer-regexp
(buffer-substring (line-beginning-position)
(line-end-position)))
(setq organizer
(ical:make-property ical:organizer addr (ical:cnparam cn)))
(push (ical:make-property ical:attendee addr (ical:cnparam cn))
attendees))))
(if organizer
(cons organizer attendees)
attendees)))