Gnus development mailing list
 help / color / mirror / Atom feed
* Quoted empty lines and format=flowed
@ 2006-02-24  9:50 Ralf Angeli
  2006-04-12  5:56 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Ralf Angeli @ 2006-02-24  9:50 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]

Hi,

this is actually an old problem (see the discussion following
<http://mid.gmane.org/bqiihe$12f$1@quimby.gnus.org> on ding) which bit
me again because one cannot disable the treatment of format=flowed
messages by means of `mm-fill-flowed' with the Gnus version in current
CVS Emacs.  (Reiner told me that he will change this.)

The problem itself is a bogus line break when a message is displayed
which includes a quoted empty line with a trailing space followed by a
long line with no trailing space.  As an example I attached a small
file which can be used for testing with `emacs -Q -l flow-fill
test.txt -eval "(fill-flowed)"'.

The result should look like this

>>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?
> Xxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?

while I would have expected this

>>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?  Xxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?

If I understand RFC3676 correctly one could get rid of this problem by
removing space-stuffing not only at the start of lines but also after
quote marks.  While it would conform to RFC3676 I am not sure if
people would like to have quoted text be displayed without spacing
between quote marks and text. Thus, the following patch removes
space-stuffing only for quoted empty lines:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 436 bytes --]

--- /usr/src/gnus/lisp/flow-fill.el.~7.15.~	2006-02-22 15:51:58 +0100
+++ /usr/src/gnus/lisp/flow-fill.el	2006-02-24 10:20:04 +0100
@@ -103,7 +103,7 @@
     (set-buffer (or (current-buffer) buffer))
     (goto-char (point-min))
     ;; Remove space stuffing.
-    (while (re-search-forward "^ " nil t)
+    (while (re-search-forward "^\\( \\|>+ $\\)" nil t)
       (delete-char -1)
       (forward-line 1))
     (goto-char (point-min))

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]


I am aware that this is rather a band-aid than a real fix, but anyway.
If something like that is acceptable I can provide a ChangeLog entry
as well.

-- 
Ralf

[-- Attachment #4: test.txt --]
[-- Type: text/plain, Size: 218 bytes --]

>>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
> 
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?  Xxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?

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

end of thread, other threads:[~2006-04-12 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-24  9:50 Quoted empty lines and format=flowed Ralf Angeli
2006-04-12  5:56 ` Lars Magne Ingebrigtsen
2006-04-12 15:30   ` Reiner Steib
2006-04-12 20:28     ` Ralf Angeli

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