GNU bug report logs - #57986
29.0.50; Citation prefix lost when message-newline-and-reformat

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Wed, 21 Sep 2022 18:35:01 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Fixed in version 29.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 57986 in the body.
You can then email your comments to 57986 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57986; Package emacs. (Wed, 21 Sep 2022 18:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 21 Sep 2022 18:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Citation prefix lost when message-newline-and-reformat
Date: Wed, 21 Sep 2022 11:34:14 -0700
In emacs -q, C-x m and put this text in the buffer:

--8<---------------cut here---------------start------------->8---
> This is some.
>
> This is more.  This is more.  This is more.  This is more.  This is more.
> This is more.  This is more.
--8<---------------cut here---------------end--------------->8---

Move point to the beginning of the second line.  M-RET.

Expected:

--8<---------------cut here---------------start------------->8---
> This is some.
>



> 
> This is more.  This is more.  This is more.  This is more.  This is
> more.  This is more.  This is more.
--8<---------------cut here---------------end--------------->8---

Actual:

--8<---------------cut here---------------start------------->8---
> This is some.



>
> This is more.  This is more.  This is more.  This is more.  This is
more.
> This is more.  This is more.
--8<---------------cut here---------------end--------------->8---

The problem, in particular, is how "more" becomes unquoted.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57986; Package emacs. (Fri, 23 Sep 2022 16:22:02 GMT) Full text and rfc822 format available.

Message #8 received at 57986 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 57986 <at> debbugs.gnu.org
Subject: Re: bug#57986: 29.0.50; Citation prefix lost when
 message-newline-and-reformat
Date: Fri, 23 Sep 2022 18:21:02 +0200
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> In emacs -q, C-x m and put this text in the buffer:
>
>> This is some.
>>
>> This is more.  This is more.  This is more.  This is more.  This is more.
>> This is more.  This is more.
>
> Move point to the beginning of the second line.  M-RET.

[...]

>> This is some.
>
>>
>> This is more.  This is more.  This is more.  This is more.  This is
> more.
>> This is more.  This is more.
>
> The problem, in particular, is how "more" becomes unquoted.

`M-RET' uses the text before point as the prefix, so if you `M-RET' at
the end of the second line, you get

---
> This is some.
>



> 
> This is more.  This is more.  This is more.  This is more.  This is
> more.  This is more.  This is more.
---

which is what we're aiming for.  So I'm not sure whether this is a
bug -- I think this is what it's meant to do.  But perhaps it should be
documented better?





Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 23 Sep 2022 16:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57986; Package emacs. (Fri, 23 Sep 2022 16:33:02 GMT) Full text and rfc822 format available.

Message #13 received at 57986 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 57986 <at> debbugs.gnu.org
Subject: Re: bug#57986: 29.0.50; Citation prefix lost when
 message-newline-and-reformat
Date: Fri, 23 Sep 2022 09:32:13 -0700
Hello,

On Fri 23 Sep 2022 at 06:21PM +02, Lars Ingebrigtsen wrote:

> `M-RET' uses the text before point as the prefix, so if you `M-RET' at
> the end of the second line, you get
>
> ---
>> This is some.
>>
>
>
>
>>
>> This is more.  This is more.  This is more.  This is more.  This is
>> more.  This is more.  This is more.
> ---
>
> which is what we're aiming for.  So I'm not sure whether this is a
> bug -- I think this is what it's meant to do.  But perhaps it should be
> documented better?

Yeah, the docstring sounds like do-what-I-mean reformatting, not
something more specific that cares about exactly where point is in the
line.  (I'd still advocate for changing it -- is there any use for this
command aside from splitting up quoted text like this?)

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57986; Package emacs. (Sat, 24 Sep 2022 09:40:01 GMT) Full text and rfc822 format available.

Message #16 received at 57986 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 57986 <at> debbugs.gnu.org
Subject: Re: bug#57986: 29.0.50; Citation prefix lost when
 message-newline-and-reformat
Date: Sat, 24 Sep 2022 11:39:36 +0200
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Yeah, the docstring sounds like do-what-I-mean reformatting, not
> something more specific that cares about exactly where point is in the
> line.  (I'd still advocate for changing it -- is there any use for this
> command aside from splitting up quoted text like this?)

No, but point determines what to use as the quote prefix, and that makes
some difference if you have variations on

>> Foo bar
>>> Foo bar zot

etc -- it uses the bit before point to find the prefix.  And if you look
at the code, it's explicitly checking whether we're at bolp to disable
that logic.

I've played around a bit hitting `M-RET' at various places, and I think
that what it does probably makes sense, even if it's not totally
intuitive, so I've just clarified this in the doc string instead of
changing what it's doing.




bug marked as fixed in version 29.1, send any further explanations to 57986 <at> debbugs.gnu.org and Sean Whitton <spwhitton <at> spwhitton.name> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 24 Sep 2022 09:40:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57986; Package emacs. (Sat, 24 Sep 2022 17:23:02 GMT) Full text and rfc822 format available.

Message #21 received at 57986 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 57986 <at> debbugs.gnu.org
Subject: Re: bug#57986: 29.0.50; Citation prefix lost when
 message-newline-and-reformat
Date: Sat, 24 Sep 2022 10:21:49 -0700
Hello,

On Sat 24 Sep 2022 at 11:39AM +02, Lars Ingebrigtsen wrote:

> Sean Whitton <spwhitton <at> spwhitton.name> writes:
>
>> Yeah, the docstring sounds like do-what-I-mean reformatting, not
>> something more specific that cares about exactly where point is in the
>> line.  (I'd still advocate for changing it -- is there any use for this
>> command aside from splitting up quoted text like this?)
>
> No, but point determines what to use as the quote prefix, and that makes
> some difference if you have variations on
>
>>> Foo bar
>>>> Foo bar zot
>
> etc -- it uses the bit before point to find the prefix.  And if you look
> at the code, it's explicitly checking whether we're at bolp to disable
> that logic.

Ah, interesting.  Thanks.

-- 
Sean Whitton




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 23 Oct 2022 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 179 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.