Gnus development mailing list
 help / color / mirror / Atom feed
* `hard-newline' changes trigger format=flowed in Gnus
@ 2005-11-29 20:41 Reiner Steib
  2005-11-29 21:08 ` Romain Francoise
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Reiner Steib @ 2005-11-29 20:41 UTC (permalink / raw)
  Cc: Chong Yidong

Hi,

the changes related to `hard-newline' seem to provoke undesired
behavior in Gnus.

I can't reproduce the problem with an older CVS build (before
`hard-newline' was introduced): "GNU Emacs 22.0.50.1
(i386-mingw-nt5.1.2600) of 2005-06-26 on NONIQPC".  I can work around
the problem by setting (setq hard-newline "\n") so I'm quite sure the
problem is triggered by the `hard-newline' changes.

Bug description:

When copying some lines from the mail header (in Gnus' message mode)
into the mail body, some of the newlines seem to be marked as `hard'.
When sending (or previewing) the message, the function
`fill-flowed-encode' detects the hard newlines and the whole message
is encodes as format=flowed which leads to an unexpected output.

To reproduce, save the following lines to `flow-fill_test.el' and
start emacs with "emacs -Q -l flow-fill_test.el".

--8<---------------cut here---------------start------------->8---
(gnus-slave-no-server 1)
(setq temp-address "foo@bar.invalid")
(gnus-msg-mail temp-address
	       "test on hard-newlines"
	       `(("From" ,temp-address)))
(with-current-buffer (get-buffer (format "*mail to %s*" temp-address))
  (insert-buffer-substring (current-buffer)
			   (point-min) (- (point-max) 13))
  (insert "...\nfoo\nbar\nbaz\nzab\n")
  (mml-preview))
--8<---------------cut here---------------end--------------->8---

The message buffer looks like this:

,----
| From: foo@bar.invalid
| To: foo@bar.invalid
| Subject: test on hard-newlines
| --text follows this line--
| From: foo@bar.invalid
| To: foo@bar.invalid
| Subject: test on hard-newlines
| --text follows...
| foo
| bar
| baz
| zab
`----

Whereas in the preview buffer and the sent message, I get:

,----
| From: foo@bar.invalid
| Subject: test on hard-newlines
| To: foo@bar.invalid
| Date: Tue, 29 Nov 2005 21:21:36 +0100
| 
| From: foo@bar.invalid
| To: foo@bar.invalid Subject: test on hard-newlines
| --text follows...  foo bar baz zab
`----

Apparently the newlines in the From and Subject lines are hard and the
newline in the To line and all other lines aren't.

I don't know if (and how) this bug should be fixed Gnus
(`gnus/flow-fill.el' or `gnus/message.el'?) or in Emacs.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-12-01 17:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-29 20:41 `hard-newline' changes trigger format=flowed in Gnus Reiner Steib
2005-11-29 21:08 ` Romain Francoise
2005-11-29 21:10 ` David Koppelman
2005-11-29 22:18 ` Chong Yidong
2005-11-30 13:35   ` Per Abrahamsen
2005-11-29 23:56 ` Chong Yidong
2005-11-30 15:10   ` Reiner Steib
2005-11-30 16:30     ` Sam Steingold
2005-11-30 20:23       ` Reiner Steib
2005-11-30 22:17         ` Sam Steingold
2005-12-01 17:48           ` Reiner Steib
2005-11-30 20:31     ` David Koppelman
2005-12-01 17:44       ` Reiner Steib

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).