Gnus development mailing list
 help / color / mirror / Atom feed
From: Dave Goldberg <david.goldberg6@verizon.net>
To: ding@gnus.org
Subject: Re: calendar integration (ical) with Gnus
Date: Thu, 05 Jul 2007 18:19:26 -0400	[thread overview]
Message-ID: <m1ir8yebo1.fsf@davestoy.homelinux.org> (raw)
In-Reply-To: <u27bqeqygdx.fsf@mentor.com> (Trey Jackson's message of "Thu, 05	Jul 2007 09:17:14 -0700")

I use icalendar.el (<http://de.geocities.com/ulf_jasper/lisp/icalendar.el.txt>) and have this in my .xemacs/init.el for added support:

(require 'icalendar)

(defun dsg-icalendar-handle-part (handle)
  (when (equal (car (mm-handle-type handle)) "text/calendar")
    (with-temp-buffer
      (insert (mm-get-part handle))
      (goto-char (point-min))
      (let* ((e
	      (car (icalendar--all-events (icalendar--read-element nil nil))))
	     (subject (icalendar--convert-string-for-import
		       (or (icalendar--get-event-property e 'SUMMARY)
			   "No Subject")))
	     (dtstart (icalendar--get-event-property e 'DTSTART))
	     (dtstart-dec (icalendar--decode-isodatetime dtstart))
	     (start-d (icalendar--datetime-to-diary-date dtstart-dec))
	     (start-t (icalendar--datetime-to-colontime dtstart-dec)))
	(if (y-or-n-p
	     (format
	      "Add appointment for \"%s\" on %s at %s to diary? "
	      subject start-d start-t))
	    (icalendar-import-buffer
	     (expand-file-name "~/ical-diary") t nil))))))

(setq gnus-article-mime-part-function 'dsg-icalendar-handle-part)

The above results in my being prompted to add appointments generated by Exchange into a diary file.

-- 
Dave Goldberg
david.goldberg6@verizon.net




      reply	other threads:[~2007-07-05 22:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05 16:17 Trey Jackson
2007-07-05 22:19 ` Dave Goldberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1ir8yebo1.fsf@davestoy.homelinux.org \
    --to=david.goldberg6@verizon.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).