Gnus development mailing list
 help / color / mirror / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: ding@gnus.org
Subject: [Partial solution: how to warn about a possible BCC field] (was: warn about a BCC field)
Date: Thu, 19 Apr 2018 13:58:19 +0200	[thread overview]
Message-ID: <8736zrs90k.fsf@mat.ucm.es> (raw)
In-Reply-To: <87vact4qmu.fsf@mouse.gnus.org>

>>> "Lars" == Lars Ingebrigtsen <larsi@gnus.org> writes:

   > Uwe Brauer <oub@mat.ucm.es> writes:
   >> How do I do that? I mean which function can the article buffer and
   >> extract the information for the TO and CC fields?

   > (message-fetch-field "From"), for instance.

Thanks. I thought how to implement this.

    -  first the question is warn or change. Change would mean to kill
       all CC fields, which I consider as to much, in case the message
       comes from a mailing list.

    -  so a warning seems appropriate, (although Adam is right in
       pointing out that maybe you would automatically say yes.) 

    -  The issue is then that the function you propose works well in an
       article buffer, but I can't get it to work in a summary buffer.

    -  I could either modify the gnus-article-followup-with-original,
       but I have the feeling Lars does not like that idea.

    -  write a wrapper and bind it.

    -  use advice (which I usually try to avoid) but this time it was
       convenient.



(defun check-my-to-field ()
  "This function will be run before you execute followup. And it warns you if your email address is not 
in the To field. That warning is a safty message if you had been only on the BCC field!!"
  (interactive)
  (unless (string-match "oub@mat.ucm.es" (message-fetch-field "From"))
    (if (y-or-n-p "Warning: Followup? but you are not on the TO field, proceed?")
      (message "I hope you are sure.")
      (error
       (progn
         (message "Aborted, you are not in the To: field!!!"))))))


(defadvice gnus-article-followup-with-original (before mychecktofield activate) ;Version:1.131
  "This function will be run before you execute followup. It warns you if your email address is not in the To field. That
warning is a safty message if you had been only on the BCC field!!"
  (check-my-to-field))


So I came up with this. However what I am supposed to do in the summary
buffer?

Any thoughts??

Uwe Brauer 




  reply	other threads:[~2018-04-19 11:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 12:06 warn about a BCC field Uwe Brauer
2018-04-11 19:52 ` Lars Ingebrigtsen
2018-04-11 21:25   ` Dan Christensen
2018-04-13 18:44   ` Uwe Brauer
2018-04-13 20:29   ` Uwe Brauer
2018-04-13 20:38     ` Lars Ingebrigtsen
2018-04-13 20:59       ` Uwe Brauer
2018-04-13 21:15         ` Lars Ingebrigtsen
2018-04-13 22:23           ` Uwe Brauer
2018-04-13 22:28             ` Lars Ingebrigtsen
2018-04-14  7:15               ` Uwe Brauer
2018-04-14  9:54                 ` Adam Sjøgren
2018-04-14 10:12                   ` Uwe Brauer
2018-04-14 10:38                     ` Adam Sjøgren
2018-04-14 17:05               ` Uwe Brauer
2018-04-14 17:58                 ` Lars Ingebrigtsen
2018-04-19 11:58                   ` Uwe Brauer [this message]
2018-04-13 22:31           ` Uwe Brauer
2018-04-13 22:42             ` Adam Sjøgren
2018-04-14  7:09               ` Uwe Brauer

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=8736zrs90k.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --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).