unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7596: 23.2.90; fill-flowed with DELETE-SPACE option does not work
@ 2010-12-08 23:48 Kazuhiro Ito
  2011-01-22 19:31 ` Chong Yidong
       [not found] ` <877hdwzqdz.fsf@stupidchicken.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Kazuhiro Ito @ 2010-12-08 23:48 UTC (permalink / raw)
  To: 7596

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

When I start emacs (emacs-23 branch) with -Q and evaluate below code,
I receive unexpected result.

(with-temp-buffer
  (insert "ABC \nDEF")
  (fill-flowed nil t)
  (buffer-string))

It returns 

"ABC
DEF"

But I expect 

"ABCDEF"


I expect DELETE-SPACE option corresponds to "DelSp" parameter in
RFC3676 and works so.  Plesse see attached patch.

-- 
Kazuhiro Ito

[-- Attachment #2: flow-fill.el.diff --]
[-- Type: application/octet-stream, Size: 654 bytes --]

=== modified file 'lisp/gnus/flow-fill.el'
--- lisp/gnus/flow-fill.el	2010-01-13 08:35:10 +0000
+++ lisp/gnus/flow-fill.el	2010-12-08 10:14:13 +0000
@@ -106,8 +106,6 @@
       (forward-line 1))
     (goto-char (point-min))
     (while (re-search-forward " $" nil t)
-      (when delete-space
-	(delete-char -1))
       (when (save-excursion
 	      (beginning-of-line)
 	      (looking-at "^\\(>*\\)\\( ?\\)"))
@@ -135,6 +133,8 @@
 	      (replace-match (if (string= (match-string 2) " ")
 				 "" "\\2")))
 	    (backward-delete-char -1)
+	    (when delete-space
+	      (delete-char -1))
 	    (end-of-line))
 	  (unless sig
 	    (condition-case nil


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

* bug#7596: 23.2.90; fill-flowed with DELETE-SPACE option does not work
  2010-12-08 23:48 bug#7596: 23.2.90; fill-flowed with DELETE-SPACE option does not work Kazuhiro Ito
@ 2011-01-22 19:31 ` Chong Yidong
       [not found] ` <877hdwzqdz.fsf@stupidchicken.com>
  1 sibling, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2011-01-22 19:31 UTC (permalink / raw)
  To: ding; +Cc: Kazuhiro Ito, 7596

Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:

> (with-temp-buffer
>   (insert "ABC \nDEF")
>   (fill-flowed nil t)
>   (buffer-string))
> It returns
> "ABC
> DEF"
> But I expect
> "ABCDEF"
> I expect DELETE-SPACE option corresponds to "DelSp" parameter in
> RFC3676 and works so.  Plesse see attached patch.

Could a Gnus developer please review Kazuhiro Ito's patch?  Thanks.

--- lisp/gnus/flow-fill.el	2010-01-13 08:35:10 +0000
+++ lisp/gnus/flow-fill.el	2010-12-08 10:14:13 +0000
@@ -106,8 +106,6 @@
       (forward-line 1))
     (goto-char (point-min))
     (while (re-search-forward " $" nil t)
-      (when delete-space
-	(delete-char -1))
       (when (save-excursion
 	      (beginning-of-line)
 	      (looking-at "^\\(>*\\)\\( ?\\)"))
@@ -135,6 +133,8 @@
 	      (replace-match (if (string= (match-string 2) " ")
 				 "" "\\2")))
 	    (backward-delete-char -1)
+	    (when delete-space
+	      (delete-char -1))
 	    (end-of-line))
 	  (unless sig
 	    (condition-case nil






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

* bug#7596: 23.2.90; fill-flowed with DELETE-SPACE option does not work
       [not found] ` <877hdwzqdz.fsf@stupidchicken.com>
@ 2011-01-22 19:48   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-22 19:48 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Kazuhiro Ito, ding, 7596-close

Chong Yidong <cyd@stupidchicken.com> writes:

>> I expect DELETE-SPACE option corresponds to "DelSp" parameter in
>> RFC3676 and works so.  Plesse see attached patch.
>
> Could a Gnus developer please review Kazuhiro Ito's patch?  Thanks.

It looks reasonable to me.  I've applied the patch.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen





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

end of thread, other threads:[~2011-01-22 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 23:48 bug#7596: 23.2.90; fill-flowed with DELETE-SPACE option does not work Kazuhiro Ito
2011-01-22 19:31 ` Chong Yidong
     [not found] ` <877hdwzqdz.fsf@stupidchicken.com>
2011-01-22 19:48   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).