From: Rasmus <rasmus@gmx.us>
To: 43908@debbugs.gnu.org
Subject: bug#43908: 28.0.50; gnus-icalendar-identities bug
Date: Sat, 10 Oct 2020 17:18:05 +0200 [thread overview]
Message-ID: <87mu0uqfde.fsf@gmx.us> (raw)
[-- Attachment #1: Type: text/plain, Size: 921 bytes --]
Hi,
‘gnus-ignored-from-addresses’ can be a function,
but this is not supported by ‘gnus-icalendar-identities’ (via
‘gnus-icalendar-event--find-attendee’).
This means that rendering stops due to an error if an email with
an icalendar invitation is loaded when gnus-ignored-from-addresses
is a function.
I have attached a patch that fixes the bug for me.
Maybe it should be split into two patches as it also changes how
‘message-alternative-emails’ is handled (this too can be a
function).
Thanks in advance,
Rasmus
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.23, cairo version 1.17.3)
of 2020-10-06 built on X260
Repository revision: d36cfa21b6b695862dae772a94c63ce3aca8467e
Repository branch: makepkg Windowing system distributor 'The X.Org
Foundation', version 11.0.12009000 System Description: Arch Linux
--
What will be next?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnus-icalendar.el-Fix-bug-in-gnus-icalendar-identiti.patch --]
[-- Type: text/x-patch, Size: 1799 bytes --]
From 1e731ceaa0ca9156d281fca77251a19651b5aac0 Mon Sep 17 00:00:00 2001
From: Rasmus <rasmus@gmx.us>
Date: Thu, 1 Oct 2020 12:36:21 +0200
Subject: [PATCH] * gnus-icalendar.el: Fix bug in gnus-icalendar-identities
`gnus-ignored-from-addresses' and `message-alternative-emails' may be
functions. This is not supported by
`gnus-icalendar-event--find-attendee'.
---
lisp/gnus/gnus-icalendar.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index 7d4fa6c35c..d7e35c5587 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -180,8 +180,10 @@ gnus-icalendar-event--find-attendee
(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 @@ gnus-icalendar-identities
(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
--
2.28.0
next reply other threads:[~2020-10-10 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-10 15:18 Rasmus [this message]
2020-10-10 20:34 ` bug#43908: 28.0.50; gnus-icalendar-identities bug Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mu0uqfde.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=43908@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).