From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rasmus Newsgroups: gmane.emacs.bugs Subject: bug#43908: 28.0.50; gnus-icalendar-identities bug Date: Sat, 10 Oct 2020 17:18:05 +0200 Message-ID: <87mu0uqfde.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11500"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Emacs Gnus To: 43908@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 10 17:19:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRGeR-0002tO-Pa for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Oct 2020 17:19:15 +0200 Original-Received: from localhost ([::1]:45330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRGeQ-0007E7-R8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Oct 2020 11:19:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRGeE-0007Bx-Ro for bug-gnu-emacs@gnu.org; Sat, 10 Oct 2020 11:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRGeE-0006xh-H6 for bug-gnu-emacs@gnu.org; Sat, 10 Oct 2020 11:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kRGeE-0000a1-AJ; Sat, 10 Oct 2020 11:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rasmus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sat, 10 Oct 2020 15:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43908 X-GNU-PR-Package: emacs,gnus X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16023431032180 (code B ref -1); Sat, 10 Oct 2020 15:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Oct 2020 15:18:23 +0000 Original-Received: from localhost ([127.0.0.1]:38298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRGdb-0000Z6-B4 for submit@debbugs.gnu.org; Sat, 10 Oct 2020 11:18:23 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:32870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRGdY-0000Yx-2f for submit@debbugs.gnu.org; Sat, 10 Oct 2020 11:18:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRGdX-0006fS-PU for bug-gnu-emacs@gnu.org; Sat, 10 Oct 2020 11:18:19 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:48255) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRGdV-0006t4-Ek for bug-gnu-emacs@gnu.org; Sat, 10 Oct 2020 11:18:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1602343086; bh=d0ihofVisCYTlfrZQNJhwtwt5bag1vQfiX1y6j0gA7M=; h=X-UI-Sender-Class:From:To:Subject:Date; b=hls4wJ+Xu2ADYRpTxgdiYssGYyyr97CvTDHnv+v+g2n880lxUBO04SKzi5Khnq1Xo K5SaZUeBzxqrJqgUc50PImacKFjHFCVsB4qX8ml2d0TdD4WsTR1RfnNMgG0HEHITr0 OaRT2/msQwbslEzQEMDOiwp8Cm4gMShfR8xuOoaY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from X260 ([95.223.75.187]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1ML9uU-1kjLkS09TO-00I9sk for ; Sat, 10 Oct 2020 17:18:06 +0200 X-Provags-ID: V03:K1:ldmq2Am9Yo90uVxFhv6IsBFeNDPbstKKtzhbRu6Wu4lSVuzO74P szN7ovgJ8bzEXo0tOsYIdpRKoDqEQvmumJP7gFlvn8Vdp+xVBZWTWtz2NSn2UTgKlxL/NDl 1yTfEBhmEFTvYVR3NJwFhnQ6SSouUIvIckAQRGaMWmv01N7Zjmap7OWpvovEhRhCugmmsEl iGVHDKfl2e4ClvuO8ABsg== X-UI-Out-Filterresults: notjunk:1;V03:K0:j4qNdsTf7FQ=:g9v3Jd4xtxxuRB76Gddgpx gjpbxmnpPtvZoBHz5LI4yZL5JVASFrlgpr+p/CMcXecIgJ0zDu1D+oKWWex8SmmkFheor8Xzy bZbQ2Ga1SoeA78piJiTiBCfJv+T4tGl9aBPgMPmW60Z9wbxwDytcAPwF3U1kR6litkv1+yJCZ J5q7zz3rOx2H3KsSF9fNTNotD0iEJouQyKvUL+KxHHe8+01xzcAHiE+DfnCHOAu1PAmEEqAmy Us1gHsDMSkhWgXc4QJws7QQcXnzv0zCEF+j9TDlZG8XNJf917Yvya6tozrPyVpiEITlCSFBYn L3DfTFOx3mxTKI+Y1bvEPOISQJXA4vOFu2AHR7cDHbIa1csH5bYXHfy9dtx4UoTcQ5GnU+Dcd VB9YOvtZow4e2GYCv3wL7G3dxsvgboodREW2EcBKeGDfBWVu7g0WKHWHGtW3+eGF+jJiTxtmU yBrkdgYehXszOrp8V+rWccqup3MAfAw6rrmnab3eDSbrVJU+J6FmXb3+ma1T0RqA0VaueQcHU wqJOpX9M0rPEIXA02VBluAIkDpdkD9z+3oiBEfeHe3irLrXzd//FUZf6elUnlIhGorHj2KpuG iF1YgBfEs+FTqDSIPWO7Mg8+zRPsTquvFOvyOHyuOdWW/91NoYz8P+j6Pa0Ux2B3hRRgfXQIh PnGSz0sdb6C+RloK5Lgx6iiA9Xs+F38c9kZNq+cOORQxl6dcROTjfhLGavFYtWw+Oy1Y6EieB YJIIGOlHgFyU52NqydKvd0c87/Oq3c/3o9OC/wcTP+eYIjmSpAaofcBT1oeQWOV6qXoI4Vkz Received-SPF: pass client-ip=212.227.17.21; envelope-from=rasmus@gmx.us; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/10 11:18:06 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190215 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi, =E2=80=98gnus-ignored-from-addresses=E2=80=99 can be a function, but this is not supported by =E2=80=98gnus-icalendar-identities=E2=80=99 (v= ia=20 =E2=80=98gnus-icalendar-event--find-attendee=E2=80=99). This means that rendering stops due to an error if an email with=20 an icalendar invitation is loaded when gnus-ignored-from-addresses=20 is a function.=20 I have attached a patch that fixes the bug for me. Maybe it should be split into two patches as it also changes how=20 =E2=80=98message-alternative-emails=E2=80=99 is handled (this too can be a= =20 function). Thanks in advance, Rasmus =20 In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version=20 3.24.23, cairo version 1.17.3)=20 of 2020-10-06 built on X260=20 Repository revision: d36cfa21b6b695862dae772a94c63ce3aca8467e=20 Repository branch: makepkg Windowing system distributor 'The X.Org=20 Foundation', version 11.0.12009000 System Description: Arch Linux=20 --=20 What will be next? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnus-icalendar.el-Fix-bug-in-gnus-icalendar-identiti.patch Content-Transfer-Encoding: quoted-printable =46rom 1e731ceaa0ca9156d281fca77251a19651b5aac0 Mon Sep 17 00:00:00 2001 From: Rasmus 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'. =2D-- 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 =2D-- 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 =2D- 2.28.0 --=-=-=--