Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@pdc.kth.se>
Subject: Re: [patch] RFC2646, MIME format=flowed support
Date: 11 Mar 2000 22:47:28 +0100	[thread overview]
Message-ID: <iluk8j95gcv.fsf@badis.pdc.kth.se> (raw)
In-Reply-To: Per Abrahamsen's message of "24 Feb 2000 17:56:49 +0100"

Per Abrahamsen <abraham@dina.kvl.dk> writes:

> However, the patch didn't apply cleanly, your message isn't
> formatted differently after applying the patch, and compiling
> fill-flowed.el with Emacs 20.4 gave these errors:

I forgot part of the patch, sorry. 
Try this patch instead.  The 
compile error is fixed in the current 
version, <URL:http://www.pdc.kth.se/~jas/fill-flowed.el>.

(This message should be rfc2646-encoded.)

2000-03-11  Simon Josefsson  <jas@pdc.kth.se>

	* mm-decode.el (mm-dissect-singlepart): Create a MIME handle for
	text/plain parts with `format' parameters.

	* mm-view.el (autoload): Autoload fill-flowed.
	(mm-inline-text): For "plain" parts with a format=flowed
	parameter, call `fill-flowed'.

Index: lisp/mm-view.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/mm-view.el,v
retrieving revision 5.40
diff -w -u -r5.40 mm-view.el
--- lisp/mm-view.el	1999/12/12 17:33:18	5.40
+++ lisp/mm-view.el	2000/03/11 21:35:15
@@ -33,6 +33,7 @@
   (autoload 'gnus-article-prepare-display "gnus-art")
   (autoload 'vcard-parse-string "vcard")
   (autoload 'vcard-format-string "vcard")
+  (autoload 'fill-flowed "fill-flowed")
   (autoload 'diff-mode "diff-mode"))
 
 ;;;
@@ -136,6 +137,14 @@
 	    (charset (mail-content-type-get
 		      (mm-handle-type handle) 'charset)))
 	(insert (mm-decode-string text charset))
+	(when (and (equal type "plain")
+		   (equal (cdr (assoc 'format (mm-handle-type handle)))
+			  "flowed"))
+	  (save-restriction
+	    (narrow-to-region b (point))
+	    (goto-char b)
+	    (fill-flowed)
+	    (goto-char (point-max))))
 	(save-restriction
 	  (narrow-to-region b (point))
 	  (set-text-properties (point-min) (point-max) nil)
Index: lisp/mm-decode.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/mm-decode.el,v
retrieving revision 5.71
diff -w -u -r5.71 mm-decode.el
--- lisp/mm-decode.el	2000/03/07 14:28:55	5.71
+++ lisp/mm-decode.el	2000/03/11 21:35:15
@@ -257,7 +257,9 @@
 
 (defun mm-dissect-singlepart (ctl cte &optional force cdl description id)
   (when (or force
-	    (not (equal "text/plain" (car ctl))))
+	    (if (equal "text/plain" (car ctl))
+		(assoc 'format ctl)
+	      t))
     (let ((res (mm-make-handle
 		(mm-copy-to-buffer) ctl cte nil cdl description nil id)))
       (push (car res) mm-dissection-list)



  reply	other threads:[~2000-03-11 21:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-17 16:50 Simon Josefsson
2000-02-24 16:56 ` Per Abrahamsen
2000-03-11 21:47   ` Simon Josefsson [this message]
2000-03-15  8:57     ` Per Abrahamsen
2000-03-15  9:05       ` Hrvoje Niksic
2000-03-15 12:39         ` Eric S. Johansson
2000-03-15 13:39         ` Andi Hechtbauer
2000-03-26 21:48       ` Simon Josefsson
2000-04-20 21:07         ` Lars Magne Ingebrigtsen
2000-04-20 22:03           ` Simon Josefsson
2000-04-20 22:52             ` Lars Magne Ingebrigtsen
2000-04-20 23:17               ` Simon Josefsson
2000-04-20 23:36                 ` Lars Magne 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

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

  git send-email \
    --in-reply-to=iluk8j95gcv.fsf@badis.pdc.kth.se \
    --to=jas@pdc.kth.se \
    /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).