Gnus development mailing list
 help / color / mirror / Atom feed
* [flow-fill.el] Filling of quoted blank lines
@ 2003-12-02 17:35 Ralf Angeli
  2003-12-02 18:00 ` Simon Josefsson
  2004-01-19 10:05 ` Ralf Angeli
  0 siblings, 2 replies; 13+ messages in thread
From: Ralf Angeli @ 2003-12-02 17:35 UTC (permalink / raw)


Hello everybody,

there are quite some people out there using Mozilla with
`format=flowed' enabled.  This is handled nicely by `flow-fill.el'
except when it comes to quoted blank lines.  Mozilla is quoting them
with `> \n' where `flow-fill.el' sees soft line breaks at the end. The
lines are filled and disappear.  You can have a look at an example in
comp.text.tex; the MID is <news:bqia0o$2tm$02$1@news.t-online.com>.
Compare the display of the message using `C-u g' and `g'.  In the
latter case some lines are missing.

Is this the intended behaviour?  I find it a little bit irritating and
sometimes don't even want to answer such posts as I am afraid that
Gnus messes up the text.

I looked into `flow-fill.el' and made some changes which now take
lines with `> ' into account and won't fill them.  They are attached
at the bottom of this article.  I am not sure if I understood the code
correctly so there might be some changes needed in the respective
regular expressions.

It would be nice if the behaviour of Gnus could be changed in the
respective manner.

Regards,
Ralf

-- 
 Moo!
     `~~_.
______',,/______ No gnus is bad news.


--8<---------------cut here---------------start------------->8---
Index: flow-fill.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/flow-fill.el,v
retrieving revision 6.17
diff -u -r6.17 flow-fill.el
--- flow-fill.el	23 Oct 2003 05:52:49 -0000	6.17
+++ flow-fill.el	2 Dec 2003 17:14:01 -0000
@@ -112,7 +112,7 @@
 	      (beginning-of-line)
 	      (looking-at "^\\(>*\\)\\( ?\\)"))
 	(let ((quote (match-string 1))
-	      sig)
+	      except)
 	  (if (string= quote "")
 	      (setq quote nil))
 	  (when (and quote (string= (match-string 2) ""))
@@ -124,8 +124,10 @@
 	  ;; XXX slightly buggy handling of "-- "
 	  (while (and (save-excursion
 			(ignore-errors (backward-char 3))
-			(setq sig (looking-at "-- "))
-			(looking-at "[^-][^-] "))
+			(setq except (or (looking-at "-- ")
+                                         (looking-at ">[ >]*$")))
+			(looking-at "[^-][^-] ")
+                        (looking-at "[^>] $"))
 		      (save-excursion
 			(unless (eobp)
 			  (forward-char 1)
@@ -136,7 +138,7 @@
 				 "" "\\2")))
 	    (backward-delete-char -1)
 	    (end-of-line))
-	  (unless sig
+	  (unless except
 	    (condition-case nil
 		(let ((fill-prefix (when quote (concat quote " ")))
 		      (fill-column (eval fill-flowed-display-column))
--8<---------------cut here---------------end--------------->8---



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

end of thread, other threads:[~2004-01-28 16:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-02 17:35 [flow-fill.el] Filling of quoted blank lines Ralf Angeli
2003-12-02 18:00 ` Simon Josefsson
2003-12-02 18:16   ` Ralf Angeli
2003-12-03  8:23   ` Ralf Angeli
2003-12-03 22:07     ` Ralf Angeli
2003-12-03 23:21       ` Simon Josefsson
2003-12-04 10:09         ` Ralf Angeli
2003-12-04 15:36           ` Simon Josefsson
2004-01-19 10:05 ` Ralf Angeli
2004-01-27 14:43   ` Ralf Angeli
2004-01-27 20:46     ` Simon Josefsson
2004-01-28  8:04       ` Ralf Angeli
2004-01-28 16:47         ` Simon Josefsson

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