Gnus development mailing list
 help / color / mirror / Atom feed
From: Jan Tatarik <jan.tatarik@gmail.com>
To: ding@gnus.org
Subject: Re: gnus-icalendar - RSVP handling
Date: Wed, 20 Nov 2013 00:00:31 +0100	[thread overview]
Message-ID: <877gc40zg0.fsf@nb-jtatarik2.xing.hh> (raw)
In-Reply-To: <87li0khyao.fsf@topper.koldfront.dk> ("Adam \=\?utf-8\?Q\?Sj\?\= \=\?utf-8\?Q\?\=C3\=B8gren\=22's\?\= message of "Tue, 19 Nov 2013 22:33:19 +0100")

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

On Tue, Nov 19 2013, Adam Sjøgren wrote:

>> If we let the user specify a list of mailing lists he's subscribed to
>> (or suck this info directly from gnus groups), we could add it to
>> gnus-icalendar-identities and any RSVP sent to your mailing list will
>> produce answer buttons for you.

>> Is it OK?

> I see your point.

> In my use-case it is far from ideal - the company has many wide
> mailinglists that I am on without knowing it (everybody in a logical
> part of the company, everybody in a building, everybody in a country,
> etc. etc.).

> But I can add them as I go along, so it should be workable.

Does this work for you?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: extended_identities.patch --]
[-- Type: text/x-diff, Size: 1627 bytes --]

diff --git a/lisp/gnus-icalendar.el b/lisp/gnus-icalendar.el
index a8277635f3e1571722a01cb4b0fe4452ca7d2434..64ed556c7a5ecd40827b7eddfbfd01122fa05b21 100644
--- a/lisp/gnus-icalendar.el
+++ b/lisp/gnus-icalendar.el
@@ -617,6 +617,22 @@ is searched."
   :type '(string)
   :group 'gnus-icalendar)
 
+(defcustom gnus-icalendar-additional-identities nil
+  "We need to know your identity to make replies to calendar requests work.
+
+Gnus will only offer you the Accept/Tentative/Decline buttons for
+calendar events if any of your identities matches at least one
+RSVP participant.
+
+Your identity is guessed automatically from the variables `user-full-name',
+`user-mail-address', and `gnus-ignored-from-addresses'.
+
+If you need even more aliases you can define them here.  It really
+only makes sense to define names or email addresses."
+
+  :type '(repeat string)
+  :group 'gnus-icalendar)
+
 (make-variable-buffer-local
  (defvar gnus-icalendar-reply-status nil))
 
@@ -630,8 +646,9 @@ is searched."
   (apply #'append
          (mapcar (lambda (x) (if (listp x) x (list x)))
                  (list user-full-name (regexp-quote user-mail-address)
-                       ; NOTE: this one can be a list
-                       gnus-ignored-from-addresses))))
+                       ; NOTE: these can be lists
+                       gnus-ignored-from-addresses ; already regexp-quoted
+                       (mapcar #'regexp-quote gnus-icalendar-additional-identities)))))
 
 ;; TODO: make the template customizable
 (defmethod gnus-icalendar-event->gnus-calendar ((event gnus-icalendar-event) &optional reply-status)

  reply	other threads:[~2013-11-19 23:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 11:15 Adam Sjøgren
2013-11-19 13:15 ` Jan Tatarik
2013-11-19 21:33   ` Adam Sjøgren
2013-11-19 23:00     ` Jan Tatarik [this message]
2013-11-21 22:43       ` Adam Sjøgren
2013-12-02 15:52       ` Adam Sjøgren
2013-12-02 21:19         ` Jan Tatarik
2013-12-18 21:11           ` Adam Sjøgren

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877gc40zg0.fsf@nb-jtatarik2.xing.hh \
    --to=jan.tatarik@gmail.com \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).