From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#51324: 28.0.50; Should `message-mark-inserted-region' insert a newline before the end tag? Date: Thu, 21 Oct 2021 16:33:22 -0700 Message-ID: <875ytqymv1.fsf@ericabrahamsen.net> References: <8735ouui74.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23904"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: 51324@debbugs.gnu.org Cancel-Lock: sha1:38guLTiNuMVHZmmTzpk6aov5+JE= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 22 01:34:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdhZb-0005zr-SF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Oct 2021 01:34:11 +0200 Original-Received: from localhost ([::1]:53732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdhZZ-0003xA-U8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 19:34:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdhZS-0003vo-6M for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 19:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdhZR-0006lZ-Ue for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 19:34:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdhZR-0006Gn-Mf for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 19:34:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <8735ouui74.fsf@gmail.com> Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Oct 2021 23:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51324 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163485921224055 (code B ref -1); Thu, 21 Oct 2021 23:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Oct 2021 23:33:32 +0000 Original-Received: from localhost ([127.0.0.1]:58930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdhYy-0006Fu-Hc for submit@debbugs.gnu.org; Thu, 21 Oct 2021 19:33:32 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdhYx-0006Fn-9I for submit@debbugs.gnu.org; Thu, 21 Oct 2021 19:33:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdhYx-0003gG-19 for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 19:33:31 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:38648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdhYu-0006jO-UA for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 19:33:30 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mdhYt-00052P-6z for bug-gnu-emacs@gnu.org; Fri, 22 Oct 2021 01:33:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217837 Archived-At: Bodertz 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: > > > text in the region > > 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: > > > text in the region > > > `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.