Uwe Brauer <[email protected]> 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/[email protected]/msg01295.html _______________________________________________ info-gnus-english mailing list [email protected] http://lists.gnu.org/mailman/listinfo/info-gnus-english
