unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Christophe Troestler <christophe.troestler@umons.ac.be>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 41723@debbugs.gnu.org
Subject: bug#41723: 26.3; Enable replying to an ical event even when not an attendee
Date: Fri, 05 Jun 2020 20:23:19 +0200	[thread overview]
Message-ID: <87sgf9jrs8.fsf@poincare.umons.ac.be> (raw)
In-Reply-To: <87v9k5cs2v.fsf@tcd.ie>

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

Hi,

Thanks for your comments.

On  5 June 2020 at 19:58 CEST, Basil L. Contovounesios <contovob@tcd.ie> wrote:
>
> The commit message conventions followed by Emacs are described in the
> file CONTRIBUTE and also under (info "(emacs) Format of ChangeLog").
> It's fine to include the free-standing prose, but the commit message
> should also mention the file and definition being changed, e.g.:
>
> * lisp/gnus/gnus-icalendar.el
> (gnus-icalendar-event--build-reply-event-body): Display a warning
> instead of barfing when user is missing from attendee list.

Thanks, I have updated it.

>> +        (lwarn 'gnus :warning
>                   ^^^^^
> Why not 'gnus-icalendar instead?

I used “'gnus” as the umbrella but “'gnus-icalendar” is fine too.

Updated patch attached.

Best,
C.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Enable replying to an ical event even when not an attendee --]
[-- Type: text/x-diff, Size: 1567 bytes --]

From 46b02723e714aa0d0e740c61cc6fd7d05e426978 Mon Sep 17 00:00:00 2001
From: Christophe Troestler <Christophe.Troestler@umons.ac.be>
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"

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event--build-reply-event-body): Display a warning
instead of barfing when user is missing from attendee list.

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..29d3e30780 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-icalendar :warning
+               "Could not find an event attendee matching given identity"))
 
       (mapconcat #'identity `("BEGIN:VEVENT"
                               ,@(nreverse reply-event-lines)
-- 
2.26.2


  reply	other threads:[~2020-06-05 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 15:56 bug#41723: 26.3; Enable replying to an ical event even when not an attendee Christophe Troestler
2020-06-05 17:58 ` Basil L. Contovounesios
2020-06-05 18:23   ` Christophe Troestler [this message]
2020-08-05 16:02     ` 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=87sgf9jrs8.fsf@poincare.umons.ac.be \
    --to=christophe.troestler@umons.ac.be \
    --cc=41723@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    /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).