unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag?
@ 2021-10-21 22:27 Bodertz
  2021-10-21 23:33 ` Eric Abrahamsen
  2021-10-22 14:38 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Bodertz @ 2021-10-21 22:27 UTC (permalink / raw)
  To: 51324

The function `message-mark-inserted-region', bound to {C-c M-m} in
message-mode, inserts "cut here" text around the region.  By default,
the end tag is inserted directly after the text in the region, resulting
in:

    <mark-here-beg-text>
    text in the region<mark-here-end-text>

The text inserted is customizable by changing the values of either or
both of `message-mark-insert-beginning' and `message-mark-insert-end',
so what the defaults are doesn't matter much, but I think it would make
more sense for the default end tag to include a newline at the
beginning, or for the function `message-mark-inserted-region' to insert
a newline before the end tag:

    <mark-here-beg-text>
    text in the region
    <mark-here-end-text>

`message-mark-insert-beginning' already includes a newline at the end,
so I think making `message-mark-insert-end' include a newline at the
beginning makes sense.  Otherwise, a user will have to insert the
newline manually every time, since I don't think the anyone ever wants
to see it without the newline:

    --8<---------------cut here---------------start------------->8---
    text in the region--8<---------------cut here---------------end--------------->8---



The same issue applies when using the prefix argument to use so-called
verbatim marks:

    #v+
    text in the region#v-

This looks wrong to me, but maybe it isn't.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag?
  2021-10-21 22:27 bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag? Bodertz
@ 2021-10-21 23:33 ` Eric Abrahamsen
  2021-10-22 14:38 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2021-10-21 23:33 UTC (permalink / raw)
  To: 51324

Bodertz <bodertz@gmail.com> writes:

> The function `message-mark-inserted-region', bound to {C-c M-m} in
> message-mode, inserts "cut here" text around the region.  By default,
> the end tag is inserted directly after the text in the region, resulting
> in:
>
>     <mark-here-beg-text>
>     text in the region<mark-here-end-text>
>
> The text inserted is customizable by changing the values of either or
> both of `message-mark-insert-beginning' and `message-mark-insert-end',
> so what the defaults are doesn't matter much, but I think it would make
> more sense for the default end tag to include a newline at the
> beginning, or for the function `message-mark-inserted-region' to insert
> a newline before the end tag:
>
>     <mark-here-beg-text>
>     text in the region
>     <mark-here-end-text>
>
> `message-mark-insert-beginning' already includes a newline at the end,
> so I think making `message-mark-insert-end' include a newline at the
> beginning makes sense.  Otherwise, a user will have to insert the
> newline manually every time, since I don't think the anyone ever wants
> to see it without the newline:
>
>     --8<---------------cut here---------------start------------->8---
>     text in the region--8<---------------cut here---------------end--------------->8---
>
>
>
> The same issue applies when using the prefix argument to use so-called
> verbatim marks:
>
>     #v+
>     text in the region#v-
>
> This looks wrong to me, but maybe it isn't.

Skeletons are unfashionable these days, but they provide nice facilities
for these situations: wrapping the region, and adding a newline only if
there isn't one.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag?
  2021-10-21 22:27 bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag? Bodertz
  2021-10-21 23:33 ` Eric Abrahamsen
@ 2021-10-22 14:38 ` Lars Ingebrigtsen
  2021-10-22 15:52   ` Bodertz
  1 sibling, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-22 14:38 UTC (permalink / raw)
  To: Bodertz; +Cc: 51324

Bodertz <bodertz@gmail.com> writes:

> The function `message-mark-inserted-region', bound to {C-c M-m} in
> message-mode, inserts "cut here" text around the region.  By default,
> the end tag is inserted directly after the text in the region, resulting
> in:
>
>     <mark-here-beg-text>
>     text in the region<mark-here-end-text>

This is now fixed in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag?
  2021-10-22 14:38 ` Lars Ingebrigtsen
@ 2021-10-22 15:52   ` Bodertz
  2021-10-22 16:07     ` Robert Pluim
  0 siblings, 1 reply; 7+ messages in thread
From: Bodertz @ 2021-10-22 15:52 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 51324

Apologies for the noise then.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag?
  2021-10-22 15:52   ` Bodertz
@ 2021-10-22 16:07     ` Robert Pluim
  2021-10-22 16:44       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Pluim @ 2021-10-22 16:07 UTC (permalink / raw)
  To: Bodertz; +Cc: 51324, Lars Ingebrigtsen

>>>>> On Fri, 22 Oct 2021 09:52:43 -0600, Bodertz <bodertz@gmail.com> said:

    Bodertz> Apologies for the noise then.

I think thereʼs a misunderstanding: you noticed and reported a bug,
and Lars fixed it. No need to apologize, applause all round.

Robert

-- 





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag?
  2021-10-22 16:07     ` Robert Pluim
@ 2021-10-22 16:44       ` Lars Ingebrigtsen
  2021-10-22 16:51         ` Bodertz
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-22 16:44 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 51324, Bodertz

Robert Pluim <rpluim@gmail.com> writes:

> I think thereʼs a misunderstanding: you noticed and reported a bug,
> and Lars fixed it. No need to apologize, applause all round.

Perhaps I should switch to saying "I've now fixed this"?  Sounds so
self-aggrandising, but it's less ambiguous...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag?
  2021-10-22 16:44       ` Lars Ingebrigtsen
@ 2021-10-22 16:51         ` Bodertz
  0 siblings, 0 replies; 7+ messages in thread
From: Bodertz @ 2021-10-22 16:51 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 51324, Robert Pluim

No need.  I imagine I just skipped over the 'now'.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-22 16:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 22:27 bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag? Bodertz
2021-10-21 23:33 ` Eric Abrahamsen
2021-10-22 14:38 ` Lars Ingebrigtsen
2021-10-22 15:52   ` Bodertz
2021-10-22 16:07     ` Robert Pluim
2021-10-22 16:44       ` Lars Ingebrigtsen
2021-10-22 16:51         ` Bodertz

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).