GNU bug report logs -
#43299
28.0.50; message-newline-and-reformat does not insert space after citation prefix
Previous Next
Reported by: Amin Bandali <bandali <at> gnu.org>
Date: Wed, 9 Sep 2020 21:36:01 UTC
Severity: minor
Tags: fixed
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43299 in the body.
You can then email your comments to 43299 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43299
; Package
emacs
.
(Wed, 09 Sep 2020 21:36:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Amin Bandali <bandali <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 09 Sep 2020 21:36:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This has been a pet peeve of mine for a while now, so I thought I'd send
in a report.
Currently, the `message-newline-and-reformat' function (bound to M-RET
in `message-mode') does not insert an empty space after the citation
prefix (e.g. '>') when reformatting the lines following the point in a
common use scenario. I would like the behaviour to change, or at least
an option be added to have `message-newline-and-reformat' insert a space
after each '>'.
Example:
--8<---------------cut here---------------start------------->8---
> test0
>
> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12
--8<---------------cut here---------------end--------------->8---
If you put the point on the line between test0 and test1, after the '>'
character, and press M-RET, it will result in:
--8<---------------cut here---------------start------------->8---
> test0
>
>
> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11
>test12
--8<---------------cut here---------------end--------------->8---
Notice the absence of space between ">" and "test12". If the original
line is long enough for the filled version to span several lines, all of
them will not have a space after '>', similar to the above example.
Instead, I would like pressing M-RET in the above example to yield:
--8<---------------cut here---------------start------------->8---
> test0
>
>
> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11
> test12
--8<---------------cut here---------------end--------------->8---
As somewhat of a workaround, one could manually insert a space on the
line between "test0" and "test1" before calling the function, but that
results in the two middle lines (which only consist of '>') to have an
extraneous trailing space, i.e. "> ".
Severity set to 'minor' from 'normal'
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Wed, 09 Sep 2020 21:55:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43299
; Package
emacs
.
(Thu, 10 Sep 2020 21:29:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 43299 <at> debbugs.gnu.org (full text, mbox):
Amin Bandali <bandali <at> gnu.org> writes:
> Currently, the `message-newline-and-reformat' function (bound to M-RET
> in `message-mode') does not insert an empty space after the citation
> prefix (e.g. '>') when reformatting the lines following the point in a
> common use scenario. I would like the behaviour to change, or at least
> an option be added to have `message-newline-and-reformat' insert a space
> after each '>'.
>
> Example:
>
>> test0
>>
>> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12
The problem here is that there's no space after that > character. If it
had been
> test0
>
> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12
instead (if that trailing space survives the mailing process) then you get
> test0
>
>
> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11
> test12
Hm... OK, I think I found it -- I think there was a reversed check for
the length of the spaces in the following paragraph? I pushed a fix to
Emacs 28 that seems to fix this use case, but I'm not exactly confident
that this doesn't introduce other oddities.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 10 Sep 2020 21:29:01 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
43299 <at> debbugs.gnu.org and Amin Bandali <bandali <at> gnu.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 10 Sep 2020 21:29:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43299
; Package
emacs
.
(Thu, 10 Sep 2020 21:46:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 43299 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen writes:
> Amin Bandali <bandali <at> gnu.org> writes:
>
>> Currently, the `message-newline-and-reformat' function (bound to M-RET
>> in `message-mode') does not insert an empty space after the citation
>> prefix (e.g. '>') when reformatting the lines following the point in a
>> common use scenario. I would like the behaviour to change, or at least
>> an option be added to have `message-newline-and-reformat' insert a space
>> after each '>'.
>>
>> Example:
>>
>>> test0
>>>
>>> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12
>
> The problem here is that there's no space after that > character. If it
> had been
>
>> test0
>>
>> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12
>
> instead (if that trailing space survives the mailing process) then you get
>
>> test0
>>
>
>
>
>>
>> test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11
>> test12
>
Right, but I don't think there is normally a space there otherwise
either. For instance, when replying with (quoting) the original in
Gnus, Gnus and/or Message don't insert a trailing space after the '>'
when there is no character on that line.
>
> Hm... OK, I think I found it -- I think there was a reversed check
> for the length of the spaces in the following paragraph? I pushed a
> fix to Emacs 28 that seems to fix this use case, but I'm not exactly
> confident that this doesn't introduce other oddities.
Thanks, it does seem to cover this case. But now, there's a trailing
single space after the first '>' with no other characters after it.
Would it make sense to remove that once the filling/reformatting of the
paragraph is done?
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43299
; Package
emacs
.
(Fri, 11 Sep 2020 12:10:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 43299 <at> debbugs.gnu.org (full text, mbox):
Amin Bandali <bandali <at> gnu.org> writes:
> Thanks, it does seem to cover this case. But now, there's a trailing
> single space after the first '>' with no other characters after it.
> Would it make sense to remove that once the filling/reformatting of the
> paragraph is done?
Hm... I guess that's possibly (but sounds a bit finicky), but I'm not
sure that's necessarily more correct than the old behaviour.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43299
; Package
emacs
.
(Tue, 15 Sep 2020 14:33:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 43299 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen writes:
> Amin Bandali <bandali <at> gnu.org> writes:
>
>> Thanks, it does seem to cover this case. But now, there's a trailing
>> single space after the first '>' with no other characters after it.
>> Would it make sense to remove that once the filling/reformatting of the
>> paragraph is done?
>
> Hm... I guess that's possibly (but sounds a bit finicky), but I'm not
> sure that's necessarily more correct than the old behaviour.
I think it would be more consistent, if not necessarily more correct, to
not insert that extraneous whitespace.
Also, I've noticed another side effect of this change: now even short
lines after point get filled, which is rather annoying. For instance,
if you put the cursor after the first '>' and hit M-RET
--8<---------------cut here---------------start------------->8---
>
> Regards,
> X
> Y
--8<---------------cut here---------------end--------------->8---
you get:
--8<---------------cut here---------------start------------->8---
>
>
> Regards, X Y
--8<---------------cut here---------------end--------------->8---
IMO filling should only be done when the line length exceeds the line
length limit, like it did before this change.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43299
; Package
emacs
.
(Thu, 17 Sep 2020 14:36:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 43299 <at> debbugs.gnu.org (full text, mbox):
Amin Bandali <bandali <at> gnu.org> writes:
> Also, I've noticed another side effect of this change: now even short
> lines after point get filled, which is rather annoying. For instance,
> if you put the cursor after the first '>' and hit M-RET
>
>>
>> Regards,
>> X
>> Y
>
> you get:
>
>>
>
>>
>> Regards, X Y
>
> IMO filling should only be done when the line length exceeds the line
> length limit, like it did before this change.
That's just because you hit `M-RET' on the ">" line. If you hit it
anywhere else, all the lines are filled.
So it's just more consistent.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 16 Oct 2020 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.