* bug#17190: 24.4.50; fill-flow checks quoted lines after deleting leading space
@ 2014-04-05 7:12 Kazuhiro Ito
2019-08-15 0:20 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Kazuhiro Ito @ 2014-04-05 7:12 UTC (permalink / raw)
To: 17190
When I evaluate the below code, I receive unexpected result.
(with-temp-buffer
(require 'flow-fill)
(insert " > ABC \nDEF\n")
(fill-flowed)
;; (mime-display-text/plain-flowed)
(buffer-string))
->
"> ABC
DEF
"
But I expect the below result.
"> ABC DEF
"
--
Kazuhiro Ito
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17190: 24.4.50; fill-flow checks quoted lines after deleting leading space
2014-04-05 7:12 bug#17190: 24.4.50; fill-flow checks quoted lines after deleting leading space Kazuhiro Ito
@ 2019-08-15 0:20 ` Lars Ingebrigtsen
2019-08-15 9:59 ` Kazuhiro Ito
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-15 0:20 UTC (permalink / raw)
To: Kazuhiro Ito; +Cc: 17190
Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:
> When I evaluate the below code, I receive unexpected result.
>
> (with-temp-buffer
> (require 'flow-fill)
> (insert " > ABC \nDEF\n")
> (fill-flowed)
> ;; (mime-display-text/plain-flowed)
> (buffer-string))
>
> ->
> "> ABC
> DEF
> "
> But I expect the below result.
>
> "> ABC DEF
> "
If I'm reading
https://tools.ietf.org/html/rfc2646
right, that's not how this is supposed to work, and `fill-flowed' does
it correctly -- it's supposed to flow together lines that have the same
quotation level, like this:
(with-temp-buffer
(require 'flow-fill)
(insert " > ABC \n> DEF\n")
(fill-flowed)
(buffer-string))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17190: 24.4.50; fill-flow checks quoted lines after deleting leading space
2019-08-15 0:20 ` Lars Ingebrigtsen
@ 2019-08-15 9:59 ` Kazuhiro Ito
2019-08-15 23:59 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Kazuhiro Ito @ 2019-08-15 9:59 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 17190
> > When I evaluate the below code, I receive unexpected result.
> >
> > (with-temp-buffer
> > (require 'flow-fill)
> > (insert " > ABC \nDEF\n")
> > (fill-flowed)
> > ;; (mime-display-text/plain-flowed)
> > (buffer-string))
> >
> > ->
> > "> ABC
> > DEF
> > "
> > But I expect the below result.
> >
> > "> ABC DEF
> > "
>
> If I'm reading
>
> https://tools.ietf.org/html/rfc2646
>
> right, that's not how this is supposed to work, and `fill-flowed' does
> it correctly -- it's supposed to flow together lines that have the same
> quotation level, like this:
Please beware Space-Stuffing at the first line. The first line is not
quoted one. " > ABC " and "DEF" have the same quotation level.
--
Kazuhiro Ito
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17190: 24.4.50; fill-flow checks quoted lines after deleting leading space
2019-08-15 9:59 ` Kazuhiro Ito
@ 2019-08-15 23:59 ` Lars Ingebrigtsen
2019-08-16 1:00 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-15 23:59 UTC (permalink / raw)
To: Kazuhiro Ito; +Cc: 17190
Kazuhiro Ito <kzhr@d1.dion.ne.jp> writes:
> Please beware Space-Stuffing at the first line. The first line is not
> quoted one. " > ABC " and "DEF" have the same quotation level.
Ah, I missed that bit. And:
4.4. Space-Stuffing
In order to allow for unquoted lines which start with ">", and to
protect against systems which "From-munge" in-transit messages
(modifying any line which starts with "From " to ">From "),
Format=Flowed provides for space-stuffing.
Space-stuffing adds a single space to the start of any line which
needs protection when the message is generated. On reception, if the
first character of a line is a space, it is logically deleted. This
occurs after the test for a quoted line, and before the test for a
flowed line.
So `fill-flowed' is definitely doing this wrong -- it just deletes the
space stuffing before it does any of the processing, which is the
opposite of what it should do, really.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17190: 24.4.50; fill-flow checks quoted lines after deleting leading space
2019-08-15 23:59 ` Lars Ingebrigtsen
@ 2019-08-16 1:00 ` Lars Ingebrigtsen
2019-08-16 14:31 ` Kazuhiro Ito
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-16 1:00 UTC (permalink / raw)
To: Kazuhiro Ito; +Cc: 17190
Lars Ingebrigtsen <larsi@gnus.org> writes:
> So `fill-flowed' is definitely doing this wrong -- it just deletes the
> space stuffing before it does any of the processing, which is the
> opposite of what it should do, really.
I've now reimplemented the function to follow the algorithm proposed by
the RFC more closely in Emacs 27.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17190: 24.4.50; fill-flow checks quoted lines after deleting leading space
2019-08-16 1:00 ` Lars Ingebrigtsen
@ 2019-08-16 14:31 ` Kazuhiro Ito
0 siblings, 0 replies; 6+ messages in thread
From: Kazuhiro Ito @ 2019-08-16 14:31 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 17190
> > So `fill-flowed' is definitely doing this wrong -- it just deletes the
> > space stuffing before it does any of the processing, which is the
> > opposite of what it should do, really.
>
> I've now reimplemented the function to follow the algorithm proposed by
> the RFC more closely in Emacs 27.
I confirmed the problem was fixed.
Thank you!
--
Kazuhiro Ito
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-16 14:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-05 7:12 bug#17190: 24.4.50; fill-flow checks quoted lines after deleting leading space Kazuhiro Ito
2019-08-15 0:20 ` Lars Ingebrigtsen
2019-08-15 9:59 ` Kazuhiro Ito
2019-08-15 23:59 ` Lars Ingebrigtsen
2019-08-16 1:00 ` Lars Ingebrigtsen
2019-08-16 14:31 ` Kazuhiro Ito
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.