Function: diary-from-outlook-gnus

diary-from-outlook-gnus is an interactive and byte-compiled function defined in diary-lib.el.gz.

Signature

(diary-from-outlook-gnus &optional NOCONFIRM)

Documentation

Maybe snarf diary entry from Outlook-generated message in Gnus.

Unless the optional argument NOCONFIRM is non-nil (which is the case when this function is called interactively), then if an entry is found the user is asked to confirm its addition. Add this function to gnus-article-prepare-hook to notice appointments automatically.

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
(defun diary-from-outlook-gnus (&optional noconfirm)
  "Maybe snarf diary entry from Outlook-generated message in Gnus.
Unless the optional argument NOCONFIRM is non-nil (which is the case when
this function is called interactively), then if an entry is found the
user is asked to confirm its addition.
Add this function to `gnus-article-prepare-hook' to notice appointments
automatically."
  (interactive "p")
  (with-current-buffer gnus-article-buffer
    (let ((subject (gnus-fetch-field "subject"))
          (body (if gnus-article-mime-handles
                    ;; We're multipart.  Don't get confused by part
                    ;; buttons &c.  Assume info is in first part.
                    (mm-get-part (nth 1 gnus-article-mime-handles))
                  (save-restriction
                    (gnus-narrow-to-body)
                    (buffer-string)))))
      (when (diary-from-outlook-internal subject body t)
        (when (or noconfirm (y-or-n-p "Snarf diary entry? "))
          (diary-from-outlook-internal subject body)
          (message "Diary entry added"))))))