Variable: diary-outlook-formats

diary-outlook-formats is a customizable variable defined in diary-lib.el.gz.

Value

(("[    \n]*When: [[:alpha:]]+, \\([[:alpha:]]+\\) \\([0-9][0-9]*\\), \\([0-9]\\{4\\}\\),? \\(.+\\)\n\\(?:Where: \\(.+\n\\)\\)?"
  . diary-outlook-format-1))

Documentation

Alist of regexps matching message text and replacement text.

The regexp must match the start of the message text containing an appointment, but need not include a leading ^. If it matches the current message, a diary entry is made from the corresponding template. If the template is a string, it should be suitable for passing to replace-match, and so will have occurrences of \D to substitute the match for the Dth subexpression. It must also contain a single %s which will be replaced with the text of the message's Subject field. Any other % characters must be doubled, so that the template can be passed to format.

If the template is actually a function, it is called with the message body text as argument, and may use match-string etc. to make a template following the rules above.

This variable was added, or its default value changed, in Emacs 22.1.

View in manual

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
;; TODO Sometimes the time is in a different time-zone to the one you
;; are in.  E.g., in Los Angeles, you might still get an email referring to:
;; "7:00 PM-8:00 PM. Greenwich Standard Time".
;; Note that it doesn't use a standard abbreviation for the timezone,
;; or anything helpful like that.
;; Sigh, this could cause the meeting to even be on a different day
;; to that given in the When: string.
;; These things seem to come in a multipart mail with a calendar part,
;; it's probably better to use that rather than this whole thing.
;; So this is unlikely to get improved.

;; TODO Is the format of these messages actually documented anywhere?
(defcustom diary-outlook-formats
  '(;; When: Tuesday, November 9, 2010 7:00 PM-8:00 PM. Greenwich Standard Time
    ;; Where: Meeting room B
    ("[ \t\n]*When: [[:alpha:]]+, \\([[:alpha:]]+\\) \\([0-9][0-9]*\\), \
\\([0-9]\\{4\\}\\),? \\(.+\\)\n\
\\(?:Where: \\(.+\n\\)\\)?" . diary-outlook-format-1))
  "Alist of regexps matching message text and replacement text.

The regexp must match the start of the message text containing an
appointment, but need not include a leading `^'.  If it matches the
current message, a diary entry is made from the corresponding
template.  If the template is a string, it should be suitable for
passing to `replace-match', and so will have occurrences of `\\D' to
substitute the match for the Dth subexpression.  It must also contain
a single `%s' which will be replaced with the text of the message's
Subject field.  Any other `%' characters must be doubled, so that the
template can be passed to `format'.

If the template is actually a function, it is called with the message
body text as argument, and may use `match-string' etc. to make a
template following the rules above."
  :type '(alist :key-type (regexp :tag "Regexp matching time/place")
                :value-type (choice
                             (string :tag "Template for entry")
                             (function :tag
                                       "Unary function providing template")))
  :version "22.1"
  :group 'diary)