* bug#57986: 29.0.50; Citation prefix lost when message-newline-and-reformat
@ 2022-09-21 18:34 Sean Whitton
2022-09-23 16:21 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Sean Whitton @ 2022-09-21 18:34 UTC (permalink / raw)
To: 57986
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#57986: 29.0.50; Citation prefix lost when message-newline-and-reformat
2022-09-21 18:34 bug#57986: 29.0.50; Citation prefix lost when message-newline-and-reformat Sean Whitton
@ 2022-09-23 16:21 ` Lars Ingebrigtsen
2022-09-23 16:32 ` Sean Whitton
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-23 16:21 UTC (permalink / raw)
To: Sean Whitton; +Cc: 57986
Sean Whitton <spwhitton@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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#57986: 29.0.50; Citation prefix lost when message-newline-and-reformat
2022-09-23 16:21 ` Lars Ingebrigtsen
@ 2022-09-23 16:32 ` Sean Whitton
2022-09-24 9:39 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Sean Whitton @ 2022-09-23 16:32 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 57986
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#57986: 29.0.50; Citation prefix lost when message-newline-and-reformat
2022-09-23 16:32 ` Sean Whitton
@ 2022-09-24 9:39 ` Lars Ingebrigtsen
2022-09-24 17:21 ` Sean Whitton
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-24 9:39 UTC (permalink / raw)
To: Sean Whitton; +Cc: 57986
Sean Whitton <spwhitton@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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#57986: 29.0.50; Citation prefix lost when message-newline-and-reformat
2022-09-24 9:39 ` Lars Ingebrigtsen
@ 2022-09-24 17:21 ` Sean Whitton
0 siblings, 0 replies; 5+ messages in thread
From: Sean Whitton @ 2022-09-24 17:21 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 57986
Hello,
On Sat 24 Sep 2022 at 11:39AM +02, Lars Ingebrigtsen wrote:
> Sean Whitton <spwhitton@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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-24 17:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 18:34 bug#57986: 29.0.50; Citation prefix lost when message-newline-and-reformat Sean Whitton
2022-09-23 16:21 ` Lars Ingebrigtsen
2022-09-23 16:32 ` Sean Whitton
2022-09-24 9:39 ` Lars Ingebrigtsen
2022-09-24 17:21 ` Sean Whitton
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).