From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83947 Path: news.gmane.org!not-for-mail From: Jan Tatarik Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-icalendar - RSVP handling Date: Mon, 02 Dec 2013 22:19:11 +0100 Message-ID: <87r49vx86o.fsf@nb-jtatarik2.xing.hh> References: <87bo1gprq7.fsf@topper.koldfront.dk> <87ob5g1qj9.fsf@nb-jtatarik2.xing.hh> <87li0khyao.fsf@topper.koldfront.dk> <877gc40zg0.fsf@nb-jtatarik2.xing.hh> <87txerqmg7.fsf@topper.koldfront.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1386019218 20964 80.91.229.3 (2 Dec 2013 21:20:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Dec 2013 21:20:18 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32202@lists.math.uh.edu Mon Dec 02 22:20:22 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vnaui-0004xy-2A for ding-account@gmane.org; Mon, 02 Dec 2013 22:20:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Vnatt-0001yI-Ru; Mon, 02 Dec 2013 15:19:29 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Vnats-0001y6-4p for ding@lists.math.uh.edu; Mon, 02 Dec 2013 15:19:28 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1Vnatq-000889-Gf for ding@lists.math.uh.edu; Mon, 02 Dec 2013 15:19:27 -0600 Original-Received: from mail-bk0-f43.google.com ([209.85.214.43]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1Vnatp-00068K-32 for ding@gnus.org; Mon, 02 Dec 2013 22:19:25 +0100 Original-Received: by mail-bk0-f43.google.com with SMTP id mz12so5662930bkb.16 for ; Mon, 02 Dec 2013 13:19:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=TRhQilfYVUFK0KY5+hIAJXJ5jJjvgSaTlpImTtu0wQc=; b=wfU+/W9lPEB2OooPatAvGQlFm4WxsH4L+P5bhPCYNfOSWr7z5XBFR8cwwdjszb+HR4 dywTgvQUNHdO918WuhnQZ6VMMNFPi/dAF5pyGDdT6htC2WRkLvcolX2YfgyPJ7D3qUaq 8xjiZpvEZ17t67E2HktCnUugLCaCQuqKdixhqulv9P9HSguEPosYElAPLg0JZ4uZkszL k0/vqiLwg14MOu9hu69903Nej7KQXIB/9xAlP8y9Ys1BgaW0IND6QiSW9uACKw/WTEe9 dyb+QTucuYn70zoY0si3L5J++NhnZTJi4n4yVLBKyUwNwSRmpUxXLpO7WKKTTu+VNO3p Cmrg== X-Received: by 10.204.229.139 with SMTP id ji11mr31742264bkb.4.1386019159668; Mon, 02 Dec 2013 13:19:19 -0800 (PST) Original-Received: from nb-jtatarik2.xing.hh (e177247099.adsl.alicedsl.de. [85.177.247.99]) by mx.google.com with ESMTPSA id pu8sm76192817bkb.9.2013.12.02.13.19.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Dec 2013 13:19:18 -0800 (PST) In-Reply-To: <87txerqmg7.fsf@topper.koldfront.dk> ("Adam \=\?utf-8\?Q\?Sj\?\= \=\?utf-8\?Q\?\=C3\=B8gren\=22's\?\= message of "Mon, 02 Dec 2013 16:52:56 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Spam-Score: -3.0 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83947 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Dec 02 2013, Adam Sj=C3=B8gren wrote: > Jan Tatarik writes: >> Does this work for you? > Setting gnus-icalendar-additional-identities works as expected! > One catch is that if I change it, I seem to have to restart Emacs for > the changes to be taken into account. Just changing the value of > gnus-icalendar-additional-identities isn't sufficient. Shouldn't it be? How about this? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=dynamic_identities.patch diff --git a/lisp/gnus-icalendar.el b/lisp/gnus-icalendar.el index 5f152921b663850918be8bfcb3a76f5e69bc1d6d..1abcb6e27e4b40f504de1544f8ff2b1320648e82 100644 --- a/lisp/gnus-icalendar.el +++ b/lisp/gnus-icalendar.el @@ -677,7 +677,10 @@ only makes sense to define names or email addresses." (make-variable-buffer-local (defvar gnus-icalendar-handle nil)) -(defvar gnus-icalendar-identities +(defun gnus-icalendar-identities () + "Return list of regexp-quoted names and email addresses belonging to the user. + +These will be used to retrieve the RSVP information from ical events." (apply #'append (mapcar (lambda (x) (if (listp x) x (list x))) (list user-full-name (regexp-quote user-mail-address) @@ -766,7 +769,7 @@ only makes sense to define names or email addresses." (event (caddr data)) (reply (gnus-icalendar-with-decoded-handle handle (gnus-icalendar-event-reply-from-buffer - (current-buffer) status gnus-icalendar-identities)))) + (current-buffer) status (gnus-icalendar-identities))))) (when reply (gmm-labels ((fold-icalendar-buffer () @@ -838,7 +841,7 @@ only makes sense to define names or email addresses." (defun gnus-icalendar-mm-inline (handle) - (let ((event (gnus-icalendar-event-from-handle handle gnus-icalendar-identities))) + (let ((event (gnus-icalendar-event-from-handle handle (gnus-icalendar-identities)))) (setq gnus-icalendar-reply-status nil) @@ -867,7 +870,7 @@ only makes sense to define names or email addresses." (defun gnus-icalendar-save-part (handle) (let (event) (when (and (equal (car (mm-handle-type handle)) "text/calendar") - (setq event (gnus-icalendar-event-from-handle handle gnus-icalendar-identities))) + (setq event (gnus-icalendar-event-from-handle handle (gnus-icalendar-identities)))) (gnus-icalendar-event:sync-to-org event)))) --=-=-=--