Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: iso-8859-2 characters are broken in forwarded messages.
Date: Sat, 18 Oct 2003 04:31:41 +0200	[thread overview]
Message-ID: <iluad7zjmya.fsf@extundo.com> (raw)
In-Reply-To: <iluad7znx2w.fsf@extundo.com> (Simon Josefsson's message of "Sat, 18 Oct 2003 03:39:19 +0200")

I have committed the patch below, and updated the GNUS-NEWS as
follows:

** The default for message-forward-show-mml changed to symbol best.

The behaviour for the `best' value is to show MML (i.e., convert MIME
to MML) when appropriate.  MML will not be used when forwarding signed
or encrypted messages, as the conversion invalidate the digital
signature.

2003-10-18  Simon Josefsson  <jas@extundo.com>

	* message.el (message-forward-show-mml): New default 'best.
	(message-forward-make-body): Support it.

Index: message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 6.368
diff -u -p -r6.368 message.el
--- message.el	18 Oct 2003 01:51:50 -0000	6.368
+++ message.el	18 Oct 2003 02:27:48 -0000
@@ -467,12 +467,19 @@ Otherwise, directly inline the old messa
   :group 'message-forwarding
   :type 'boolean)
 
-(defcustom message-forward-show-mml nil
-  "*Non-nil means show forwarded messages as mml.
-Otherwise, forwarded messages are unchanged."
+(defcustom message-forward-show-mml 'best
+  "*Non-nil means show forwarded messages as MML (decoded from MIME).
+Otherwise, forwarded messages are unchanged.
+Can also be the symbol `best' to indicate that MML should be
+used, except when it is a bad idea to use MML.  One example where
+it is a bad idea is when forwarding a signed or encrypted
+message, because converting MIME to MML would invalidate the
+digital signature."
   :version "21.1"
   :group 'message-forwarding
-  :type 'boolean)
+  :type '(choice (const :tag "use MML" t)
+		 (const :tag "don't use MML " nil)
+		 (const :tag "use MML when appropriate" best)))
 
 (defcustom message-forward-before-signature t
   "*Non-nil means put forwarded message before signature, else after."
@@ -6076,7 +6083,13 @@ Optional DIGEST will use digest to forwa
   (if message-forward-as-mime
       (if digest
 	  (message-forward-make-body-digest forward-buffer)
-	(if message-forward-show-mml
+	(if (and message-forward-show-mml
+		 (not (and (eq message-forward-show-mml 'best)
+			   (with-current-buffer forward-buffer
+			     (goto-char (point-min))
+			     (re-search-forward
+			      "Content-Type: *multipart/\\(signed\\|encrypted\\)"
+			      nil t)))))
 	    (message-forward-make-body-mml forward-buffer)
 	  (message-forward-make-body-mime forward-buffer)))
     (message-forward-make-body-plain forward-buffer))




      parent reply	other threads:[~2003-10-18  2:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <hhsmluupo1.fsf@blah.pl>
2003-10-15 22:26 ` Reiner Steib
     [not found]   ` <hhy8vm13yn.fsf@blah.pl>
2003-10-16  1:21     ` Simon Josefsson
     [not found]       ` <hhekxeym1t.fsf@blah.pl>
2003-10-16  4:34         ` Simon Josefsson
2003-10-17 16:59           ` Lars Magne Ingebrigtsen
2003-10-17 21:40             ` Simon Josefsson
2003-10-17 21:53               ` Lars Magne Ingebrigtsen
2003-10-17 22:05                 ` Simon Josefsson
2003-10-17 22:42                   ` Lars Magne Ingebrigtsen
2003-10-18  0:06                     ` Simon Josefsson
2003-10-18  0:43                       ` Lars Magne Ingebrigtsen
2003-10-18  1:00                         ` Simon Josefsson
2003-10-18  1:10                           ` Lars Magne Ingebrigtsen
2003-10-18  1:39                             ` Simon Josefsson
2003-10-18  1:45                               ` Lars Magne Ingebrigtsen
2003-10-18  1:52                                 ` Simon Josefsson
2003-10-18  2:00                                   ` Simon Josefsson
2003-10-18 13:55                                     ` Lars Magne Ingebrigtsen
2003-10-18 15:17                                       ` Simon Josefsson
2003-10-18 15:24                                         ` Lars Magne Ingebrigtsen
2003-10-18 23:14                                           ` Simon Josefsson
2003-10-19 11:22                                             ` Lars Magne Ingebrigtsen
2003-10-18  9:58                                   ` Romain FRANCOISE
2003-10-18  2:31                               ` Simon Josefsson [this message]

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=iluad7zjmya.fsf@extundo.com \
    --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).