all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bodertz <bodertz@gmail.com>
To: 51324@debbugs.gnu.org
Subject: bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag?
Date: Thu, 21 Oct 2021 16:27:43 -0600	[thread overview]
Message-ID: <8735ouui74.fsf@gmail.com> (raw)

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.





             reply	other threads:[~2021-10-21 22:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 22:27 Bodertz [this message]
2021-10-21 23:33 ` bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735ouui74.fsf@gmail.com \
    --to=bodertz@gmail.com \
    --cc=51324@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.