From: Rasmus Date: Sat, 10 Oct 2020 20:32:41 +0000 (+0200) Subject: gnus-icalendar.el: Fix bug in gnus-icalendar-identities X-Git-Tag: emacs-28.0.90~5693 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e8fcc14f2819d40283914cf0f9b4f43b2517ba80;p=emacs.git gnus-icalendar.el: Fix bug in gnus-icalendar-identities * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event--find-attendee): (gnus-icalendar-identities) `gnus-ignored-from-addresses' and `message-alternative-emails' may be functions. This is not supported by `gnus-icalendar-event--find-attendee' (bug#43908). --- diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 7d4fa6c35cc..d7e35c55875 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -180,8 +180,10 @@ (or (member (attendee-name prop) name-or-email) (let ((att-email (attendee-email prop))) (gnus-icalendar-find-if - (lambda (email) - (string-match email att-email)) + (lambda (str-or-fun) + (if (functionp str-or-fun) + (funcall str-or-fun att-email) + (string-match str-or-fun att-email))) name-or-email)))))) (gnus-icalendar-find-if #'attendee-prop-matches-p event-props)))) @@ -763,9 +765,8 @@ These will be used to retrieve the RSVP information from ical events." (lambda (x) (if (listp x) x (list x))) (list user-full-name (regexp-quote user-mail-address) ;; NOTE: these can be lists - gnus-ignored-from-addresses ; already regexp-quoted - (unless (functionp message-alternative-emails) ; String or function. - message-alternative-emails) + gnus-ignored-from-addresses ; String or function. + message-alternative-emails ; String or function. (mapcar #'regexp-quote gnus-icalendar-additional-identities))))) ;; TODO: make the template customizable