Subject: bug#41723: 26.3; Enable replying to an ical event even when not an attendee

From: Christophe Troestler <[email-masked]>
Date: Fri, 05 Jun 2020 17:56:54 +0200

Hi,

When one receives en ical event and the user identity is not present in the attendee list, an error is triggered making replying to such an event impossible (the reply message not being even composed).  This patch replaces it with a warning.  This is necessary because one may receive (I just did) events that the organizer did not set up well and it is up to the user (not Emacs) to decide whether or not to reply to them.

Best regards,
C.

>From a7c5289908d40b54e0c474b970d3f3786bc941af Mon Sep 17 00:00:00 2001
From: Christophe Troestler <[email-masked]>
Date: Fri, 5 Jun 2020 17:35:48 +0200
Subject: [PATCH] Enable replying to an ical event even when not an attendee
Content-Type: text/plain; charset="utf-8"

When the user identity is not present in the attendee list, an error
is triggered making replying to such an event impossible (the reply
message not being even composed).  This replaces it with a warning.
This is necessary because one may receive events that the organizer
did not set up well and it is up to the user to decide whether or not
to reply to them.
---
 lisp/gnus/gnus-icalendar.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index 305e17fd8f..f7b9a954d6 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -312,7 +312,8 @@ gnus-icalendar-event--build-reply-event-body
 
       (unless (gnus-icalendar-find-if (lambda (x) (string-match "^ATTENDEE" x))
 				      reply-event-lines)
-        (error "Could not find an event attendee matching given identity"))
+        (lwarn 'gnus :warning
+               "Could not find an event attendee matching given identity"))
 
       (mapconcat #'identity `("BEGIN:VEVENT"
                               ,@(nreverse reply-event-lines)
-- 
2.26.2

In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
 of 2020-05-17, modified by Debian built on x86-csail-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description:	Debian GNU/Linux bullseye/sid

Recent messages:
Checking spelling of RECEIVE...
RECEIVE is correct
Checking spelling of ORGANISER...
Saving file /home/trch/software/emacs/.git/COMMIT_EDITMSG...
Wrote /home/trch/software/emacs/.git/COMMIT_EDITMSG
Auto-saving...done
Saving file /home/trch/software/emacs/.git/COMMIT_EDITMSG...
Wrote /home/trch/software/emacs/.git/COMMIT_EDITMSG
Git finished
End of buffer

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --build
 x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --with-x=yes
 --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs-mHAik2/emacs-26.3+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: mu4e-headers

Minor modes in effect:
  TeX-PDF-mode: t
  global-magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  desktop-save-mode: t
  hl-line-mode: t
  show-paren-mode: t
  global-edit-server-edit-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
~/software/OCaml/dune/editor-integration/emacs/dune-flymake hides /home/trch/.opam/4.08.1/share/emacs/site-lisp/dune-flymake
~/software/OCaml/dune/editor-integration/emacs/dune hides /home/trch/.opam/4.08.1/share/emacs/site-lisp/dune
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/deb-view hides /usr/share/emacs/site-lisp/elpa/debian-el-37/deb-view
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-bug hides /usr/share/emacs/site-lisp/elpa/debian-el-37/debian-bug
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/apt-utils hides /usr/share/emacs/site-lisp/elpa/debian-el-37/apt-utils
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/preseed hides /usr/share/emacs/site-lisp/elpa/debian-el-37/preseed
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/apt-sources hides /usr/share/emacs/site-lisp/elpa/debian-el-37/apt-sources
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-autoloads hides /usr/share/emacs/site-lisp/elpa/debian-el-37/debian-autoloads
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-el hides /usr/share/emacs/site-lisp/elpa/debian-el-37/debian-el
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-el-autoloads hides /usr/share/emacs/site-lisp/elpa/debian-el-37/debian-el-autoloads
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/gnus-BTS hides /usr/share/emacs/site-lisp/elpa/debian-el-37/gnus-BTS
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-el-pkg hides /usr/share/emacs/site-lisp/elpa/debian-el-37/debian-el-pkg
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/deb-view hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/deb-view
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/apt-utils hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/apt-utils
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/preseed hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/preseed
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-bug hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-bug
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/apt-sources hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/apt-sources
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-autoloads hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-autoloads
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-el hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-el
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-el-autoloads hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-el-autoloads
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/gnus-BTS hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/gnus-BTS
/home/trch/.emacs.d/elpa/debian-el-20200401.1622/debian-el-pkg hides /usr/share/emacs/site-lisp/elpa-src/debian-el-37/debian-el-pkg
/home/trch/.emacs.d/elpa/let-alist-1.0.6/let-alist hides /usr/share/emacs/26.3/lisp/emacs-lisp/let-alist

Features:
(shadow emacsbug magit-extras bug-reference gnus-cite smiley qp texmathp
face-remap shr-color color view misearch multi-isearch eieio-opt
help-fns radix-tree cl-print debug cus-start cus-load visual-fill-column
sort mm-archive mail-extr org-rmail org-mhe org-irc org-info org-gnus
nnir org-docview org-bibtex org-bbdb org-w3m merlin-ac auto-complete
popup tuareg caml-help find-file latexenc make-mode reftex-auc preview
prv-emacs tex-buf reftex-dcr reftex reftex-loaddefs reftex-vars flyspell
ispell latex latex-flymake tex-ispell tex-style tex-mode vc-git flycheck
json map elec-pair php-mode mode-local speedbar sb-image ezimage dframe
etags xref project cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs php-face php php-project
font-latex tex dbus bibtex dune-flymake flymake-proc flymake compile
warnings dune skeleton smie merlin-cap merlin caml-types caml-emacs
magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func imenu magit-diff smerge-mode diff-mode magit-core
magit-autorevert magit-margin magit-transient magit-process magit-mode
git-commit transient magit-git magit-section magit-utils crm log-edit
pcvs-util add-log with-editor cl-extra async-bytecomp async shell subr-x
dash erc-goodies erc erc-backend erc-compat twittering-mode url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util org-mu4e org-agenda mu4e-icalendar gnus-icalendar
mu4e-contrib esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg
esh-groups eshell esh-module esh-mode esh-util bookmark pp mu4e desktop
frameset mu4e-org mu4e-main mu4e-headers mu4e-view thingatpt gnus-art
mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls
utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus
nnheader wid-edit mu4e-compose mu4e-context mu4e-draft mu4e-actions
org-capture ido rfc2368 smtpmail sendmail mu4e-mark mu4e-proc mu4e-utils
doc-view jka-compr image-mode mu4e-lists mu4e-message shr svg xml dom
browse-url flow-fill hl-line mu4e-vars message rmc puny dired
dired-loaddefs rfc822 mml mml-sec gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader mu4e-meta
adoc-mode tempo markup-faces org-element avl-tree generator org
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob
ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
format-spec find-func epa-file epa derived epg cl quail help-mode
mm-util mail-prsvr autorevert filenotify edmacro kmacro paren icalendar
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs edit-server
advice server finder-inf tex-site debian-el gh-common marshal
eieio-compat rx w3m-load info package easymenu epg-config url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 812280 153228)
 (symbols 48 67308 1)
 (miscs 40 3516 2658)
 (strings 32 250206 31367)
 (string-bytes 1 7636583)
 (vectors 16 85697)
 (vector-slots 8 2208501 176972)
 (floats 8 662 986)
 (intervals 56 10251 6253)
 (buffers 992 126))
<#secure method=smime mode=sign>