Function: diary-icalendar-attendee-skeleton

diary-icalendar-attendee-skeleton is a byte-compiled function defined in diary-icalendar.el.gz.

Signature

(diary-icalendar-attendee-skeleton ATTENDEE)

Documentation

Default skeleton to format an icalendar-attendee for the diary.

Includes any data from the attendee's icalendar-cnparam and icalendar-partstatparam, and does not insert any data if its icalendar-cutypeparam is non-nil and anything other than
"INDIVIDUAL" or "GROUP".

The result looks like:
  <foo@example.com>
or
  Baz Foo <foo@example.com>
or
  Baz Foo <foo@example.com> (declined)

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-icalendar.el.gz
;;; Skeletons
;;
;; We use skeleton.el's templating facilities to make formatting of
;; different iCalendar elements in the diary simple and easy to
;; customize.  There are default skeletons for each major type of
;; iCalendar component (`di:vevent-skeleton', `di:vtodo-skeleton',
;; `di:vjournal-skeleton'), and a corresponding defcustom pointing to
;; each of these skeletons (`di:vevent-format-function', etc.).
;; `di:format-entry' calls these skeletons, or user-provided functions,
;; to format individual components as diary entries.  Since properties
;; representing people (`icalendar-attendee', `icalendar-organizer') are
;; important and relatively complex, another skeleton
;; (`di:attendee-skeleton') takes care of formatting these for the
;; top-level component skeletons.
(defun di:attendee-skeleton (attendee)
  "Default skeleton to format an `icalendar-attendee' for the diary.

Includes any data from the attendee's `icalendar-cnparam' and
`icalendar-partstatparam', and does not insert any data if its
`icalendar-cutypeparam' is non-nil and anything other than
\"INDIVIDUAL\" or \"GROUP\".

The result looks like:
  <foo@example.com>
or
  Baz Foo <foo@example.com>
or
  Baz Foo <foo@example.com> (declined)"
  (ignore attendee) ; we only need the `attendee-' vars below
  (with-suppressed-warnings ((free-vars attendee-cutype))
    ;; skip non-human "attendees":
    (when (or (not attendee-cutype)
              (equal attendee-cutype "INDIVIDUAL")
              (equal attendee-cutype "GROUP"))
      (skeleton-insert
       '(nil
         attendee-cn
         (format " <%s>" attendee-address)
         (when attendee-partstat
           (format " (%s)" (downcase attendee-partstat))))))))