* bug#43908: 28.0.50; gnus-icalendar-identities bug
@ 2020-10-10 15:18 Rasmus
2020-10-10 20:34 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Rasmus @ 2020-10-10 15:18 UTC (permalink / raw)
To: 43908
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#43908: 28.0.50; gnus-icalendar-identities bug
2020-10-10 15:18 bug#43908: 28.0.50; gnus-icalendar-identities bug Rasmus
@ 2020-10-10 20:34 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-10 20:34 UTC (permalink / raw)
To: Rasmus; +Cc: 43908
Rasmus <rasmus@gmx.us> writes:
> 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.
Thanks; applied to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-10 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-10 15:18 bug#43908: 28.0.50; gnus-icalendar-identities bug Rasmus
2020-10-10 20:34 ` Lars Ingebrigtsen
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).