emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`hard-newline' changes trigger format=flowed in Gnus


From: Reiner Steib
Subject: `hard-newline' changes trigger format=flowed in Gnus
Date: Tue, 29 Nov 2005 21:41:25 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

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 "address@hidden")
(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: address@hidden
| To: address@hidden
| Subject: test on hard-newlines
| --text follows this line--
| From: address@hidden
| To: address@hidden
| Subject: test on hard-newlines
| --text follows...
| foo
| bar
| baz
| zab
`----

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

,----
| From: address@hidden
| Subject: test on hard-newlines
| To: address@hidden
| Date: Tue, 29 Nov 2005 21:21:36 +0100
| 
| From: address@hidden
| To: address@hidden 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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]