GNU bug report logs -
#72870
[PATCH] Flow fill texts after the last hard newline
Previous Next
Reported by: Pengji Zhang <me <at> pengjiz.com>
Date: Thu, 29 Aug 2024 10:59:01 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 12 Oct 2024 15:31:33 +0300
with message-id <86frp1wli2.fsf <at> gnu.org>
and subject line Re: bug#72870: [PATCH] Flow fill texts after the last hard newline
has caused the debbugs.gnu.org bug report #72870,
regarding [PATCH] Flow fill texts after the last hard newline
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
72870: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72870
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Tags: patch Hello!
I found that function `fill-flowed-encode' would not fill texts
after the last hard newline in a buffer. To reproduce, run 'emacs
-Q' and then evaluate the following snippet:
--8<---------------cut here---------------start------------->8---
(with-current-buffer (get-buffer-create "*tmp-f=f*")
(use-hard-newlines)
(insert "1\n2")
(fill-flowed-encode)
(display-buffer (current-buffer)))
--8<---------------cut here---------------end--------------->8---
The expected output should be '1 2', but the actual is '1\n2'.
The first patch changes this.
[0001-Flow-fill-texts-after-the-last-hard-newline.patch (text/patch, attachment)]
[Message part 5 (text/plain, inline)]
Besides, I found that the test case
'fill-flow-tests-fill-flowed-encode' in 'fill-flow-tests' does not
actually test the function 'fill-flowed-encode', which requires
'use-hard-newlines'[1], and the test input does not cover some
behaviors of the function. The second patch improves it a bit.
[0002-Improve-tests-for-flow-fill.patch (text/x-patch, attachment)]
[Message part 7 (text/plain, inline)]
The second patch depends on the first one, without which the new
test will fail. So I decided to submit both together. Please let
me know if it is better to file another report.
Thanks!
Cheers,
Pengji
PS I have sent an email to assign <at> gnu.org, but have not got a
response yet. I think I have not finished the copyright assignment
process?
[1] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/mail/flow-fill.el#n77
[Message part 8 (message/rfc822, inline)]
> From: Pengji Zhang <me <at> pengjiz.com>
> Cc: 72870 <at> debbugs.gnu.org
> Date: Wed, 09 Oct 2024 17:02:32 +0800
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> PS I have sent an email to assign <at> gnu.org, but have not got a
> >> response yet. I think I have not finished the copyright assignment
> >> process?
> >
> > No. Please ping them and CC me, so we could get your paperwork process
> > going.
>
> Hi Eli! Yesterday I was told that my assignment process had been
> complete.
Thanks, so I've now installed the patches, and I'm closing this bug.
This bug report was last modified 225 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.