From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/13632 Path: news.gmane.org!not-for-mail From: Jens Thiele Newsgroups: gmane.emacs.gnus.user Subject: Re: icalendar import while opening an article Date: Mon, 08 Feb 2010 22:19:40 +0100 Organization: Arcor Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265668835 24957 80.91.229.12 (8 Feb 2010 22:40:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Feb 2010 22:40:35 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Mon Feb 08 23:40:32 2010 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NecHP-0007Zn-8X for gegu-info-gnus-english@m.gmane.org; Mon, 08 Feb 2010 23:40:31 +0100 Original-Received: from localhost ([127.0.0.1]:50695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NecHO-0000uZ-Ol for gegu-info-gnus-english@m.gmane.org; Mon, 08 Feb 2010 17:40:30 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!kanaga.switch.ch!switch.ch!news.belwue.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 46 Original-NNTP-Posting-Date: 08 Feb 2010 23:08:17 CET Original-NNTP-Posting-Host: 4b645265.newsspool1.arcor-online.net Original-X-Trace: DXC=0]^34U7T4<@j7E:bke<5HFic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgBhD[d0[lV05@BAAL:4KlVVAOX8h8>LEElNnb>5J List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:13632 Archived-At: Uwe Brauer writes: > Hello > > I started to use Ulf Jaspers icalendar, which allows to > import icalendar events to the diary file. > > However in VM there is hook, namely > (add-hook 'vm-select-new-message-hook 'icalendar-extract-ical-from-buffer) > > Which allows you to extract the icalendar just by opening > the message, in gnus it is more complicated, > > The icalendar event displayed as an attachment, therefore I > have to toggle the display so see the content and then run > the function icalendar-extract-ical-from-buffer. > > Does anybody know about a solution comparable to the one of VM? Probably you want to use the gnus-article-mime-part-function variable: see also "(gnus)MIME Commands": ,---- | `gnus-article-mime-part-function' | For each MIME part, this function will be called with the MIME | handle as the parameter. The function is meant to be used to allow | users to gather information from the article (e. g., add Vcard | info to the bbdb database) or to do actions based on parts (e. g., | automatically save all jpegs into some directory). | | Here's an example function the does the latter: | | (defun my-save-all-jpeg-parts (handle) | (when (equal (car (mm-handle-type handle)) "image/jpeg") | (with-temp-buffer | (insert (mm-get-part handle)) | (write-region (point-min) (point-max) | (read-file-name "Save jpeg to: "))))) | (setq gnus-article-mime-part-function | 'my-save-all-jpeg-parts) | `---- Maybe that one helps: http://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg01295.html