From: Simon Josefsson <jas@extundo.com>
Subject: Re: patches add variable `gnus-confirm-mail-reply-to-news'
Date: Sun, 26 May 2002 21:11:05 +0200 [thread overview]
Message-ID: <ilusn4eafna.fsf@latte.josefsson.org> (raw)
In-Reply-To: <gd.y1y3cwelvzy.fsf@fly.verified.de> (Raymond Scholz's message of "Sun, 26 May 2002 18:22:25 +0200")
Raymond Scholz <ray-2002@zonix.de> writes:
> Simon Josefsson <jas@extundo.com> writes:
>
>> I agree. Ok, I added the original patch that defaults to not asking. Thanks.
>
> I used to have this in my .gnus for ages:
>
> (setq rs-mailing-lists "list\\.")
>
> ;; Patric Mueller in <7iq1t9.m63.ln@bhaak.xodox.com>
> ;; von mir erweitert um die Abfrage auf Mailinglisten
> (defadvice gnus-summary-reply (around reply-in-news activate)
> (when (or
> (not (or (gnus-news-group-p
> (if (gnus-virtual-group-p gnus-newsgroup-name)
> (car (nnvirtual-map-article (cdr gnus-article-current)))
> gnus-newsgroup-name
> ))
> (string-match rs-mailing-lists gnus-newsgroup-name)))
> (y-or-n-p "Really, really reply? "))
> ad-do-it))
>
> It adds "support" for virtual groups that contain newsgroups and for
> user defined lists (all of my mailing lists) where I usually don't
> want to say `R'.
>
> Would it be useful to be added to Gnus or is it too specifically
> tailored for my personal needs?
I didn't test this, but it should add support for setting the variable
to a string or function to get the behaviour you want. Does it work?
--- gnus-msg.el.~6.90.~ Thu May 23 23:57:20 2002
+++ gnus-msg.el Sun May 26 21:09:26 2002
@@ -242,9 +242,15 @@
(defcustom gnus-confirm-mail-reply-to-news nil
"If non-nil, Gnus requests confirmation when replying to news.
This is done because new users often reply by mistake when reading
-news."
+news.
+This can also be a function which should return non-nil iff a
+confirmation is needed, or a regexp, in which case a confirmation is
+asked if the group name matches the regexp."
:group 'gnus-message
- :type 'boolean)
+ :type '(choice (const :tag "No" nil)
+ (const :tag "Yes" nil)
+ (regexp :tag "Iff group matches regexp")
+ (function :tag "Iff function evaluates to non-nil")))
;;; Internal variables.
@@ -988,7 +994,11 @@
;; Allow user to require confirmation before replying by mail to the
;; author of a news article.
(when (or (not (gnus-news-group-p gnus-newsgroup-name))
- (not gnus-confirm-mail-reply-to-news)
+ (not (cond ((stringp gnus-confirm-mail-reply-to-news)
+ (string-match gnus-confirm-mail-reply-to-news gnus-newsgroup-name))
+ ((functionp gnus-confirm-mail-reply-to-news)
+ (funcall gnus-confirm-mail-reply-to-news))
+ (t gnus-confirm-mail-reply-to-news)))
(y-or-n-p "Really reply by mail to article author? "))
(let* ((article
(if (listp (car yank))
next prev parent reply other threads:[~2002-05-26 19:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-21 2:41 Benjamin Rutt
2002-05-21 9:36 ` Simon Josefsson
2002-05-21 10:46 ` Kai Großjohann
2002-05-21 12:49 ` Simon Josefsson
2002-05-21 17:11 ` Benjamin Rutt
2002-05-21 17:19 ` Benjamin Rutt
2002-05-22 8:52 ` Russ Allbery
2002-05-22 9:10 ` Simon Josefsson
2002-05-22 21:44 ` Benjamin Rutt
2002-05-23 21:36 ` Benjamin Rutt
2002-05-26 16:22 ` Raymond Scholz
2002-05-26 19:11 ` Simon Josefsson [this message]
2002-10-16 15:31 ` Raymond Scholz
2002-06-09 9:45 ` Thomas Skogestad
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=ilusn4eafna.fsf@latte.josefsson.org \
--to=jas@extundo.com \
/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).