Gnus development mailing list
 help / color / mirror / Atom feed
* calendar integration (ical) with Gnus
@ 2007-07-05 16:17 Trey Jackson
  2007-07-05 22:19 ` Dave Goldberg
  0 siblings, 1 reply; 2+ messages in thread
From: Trey Jackson @ 2007-07-05 16:17 UTC (permalink / raw)
  To: ding

All,

I looked through the documentation and searched the last two years of
gnus.ding and cannot find anything about getting gnus to process calendar
attachments (specifically meeting notices from an exchange server).

Any help/pointers?  I can start coding something up if someone would let me
know the proper places to start... such as the hooks I'd need add to in
order to process the MIME type and the such.

This is the type of the attachment:

,----------------
| Content-class: urn:content-classes:calendarmessage
| Content-Type: text/calendar;
| 	name="meeting.ics";
| 	method=REQUEST
`----------------

And I'm using gnus 5.10.8 (can easily upgrade ngnus-0.6), and emacs 22.1.


thanks,


TJ


-- 
Trey Jackson
bigfaceworm@gmail.com

"I tell my students that [they] must suppress the primal response
 of wanting to die feet first instead of head first."
-- Barry Ritchey, on teaching proper Telemark technique



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: calendar integration (ical) with Gnus
  2007-07-05 16:17 calendar integration (ical) with Gnus Trey Jackson
@ 2007-07-05 22:19 ` Dave Goldberg
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Goldberg @ 2007-07-05 22:19 UTC (permalink / raw)
  To: ding

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-05 22:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-05 16:17 calendar integration (ical) with Gnus Trey Jackson
2007-07-05 22:19 ` Dave Goldberg

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).