From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#52864: sgml-tag inserts newlines Date: Wed, 29 Dec 2021 16:32:56 +0100 Message-ID: <87wnjn5suv.fsf@gnus.org> References: <875yr8412e.5.fsf@jidanni.org> <86k0fn3if8.fsf@mail.linkov.net> <86bl0z3i81.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22235"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52864@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 29 16:34:13 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 1n2axx-0005dw-Ie for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Dec 2021 16:34:13 +0100 Original-Received: from localhost ([::1]:42088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2axw-0002PY-JY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Dec 2021 10:34:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2axm-0002PQ-LH for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2021 10:34:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2axm-000233-CF for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2021 10:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2axm-00007s-5s for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2021 10:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Dec 2021 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52864 X-GNU-PR-Package: emacs Original-Received: via spool by 52864-submit@debbugs.gnu.org id=B52864.1640791988409 (code B ref 52864); Wed, 29 Dec 2021 15:34:02 +0000 Original-Received: (at 52864) by debbugs.gnu.org; 29 Dec 2021 15:33:08 +0000 Original-Received: from localhost ([127.0.0.1]:49964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2awu-00006W-H6 for submit@debbugs.gnu.org; Wed, 29 Dec 2021 10:33:08 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:42752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2aws-00005w-GD for 52864@debbugs.gnu.org; Wed, 29 Dec 2021 10:33:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hJJsZqbZK7PrweiK2RY0bxY+/mxYe3C7LZBIu1xmDWo=; b=m255ceGRyWM8o7GUlxIfc/57NJ pBD2b2m1YSPlZEEpP9EcG8SqKViuDfl0u+RRY/wLhF8gJfjFp65S9R758teE+DaZWS6ji6gaeo2Su qdT7nj/Dlk6H9CQj3xzfgBIx0eyPK+REg6ApveaaQ7YKnEFmeKG1+wgcNE+iHOLtC+Cs=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2awj-0007Cc-02; Wed, 29 Dec 2021 16:32:59 +0100 X-Now-Playing: Four Tet's _Pole v Four Tet_: "Cload" In-Reply-To: <86bl0z3i81.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 29 Dec 2021 10:53:18 +0200") 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:223344 Archived-At: Juri Linkov writes: >> (add-hook 'sgml-mode-hook >> (lambda () >> ;; Don't insert newlines after >> (setq-local skeleton-end-newline nil))) >> >> Then maybe 'skeleton-end-newline' should be mentioned >> in the docstring of 'sgml-tag', or maybe even 'sgml-mode'. > > Or better to add a new customizable variable > that defaults to skeleton-end-newline, e.g. > > (defcustom sgml-tag-end-newline skeleton-end-newline > ... Doesn't it depend on what tag you're inserting whether it's likely you want to have a newline at the end, though? The more "block"-like tags would normally be preferably have a newline at the end, while others don't. On the other hand, if you're inserting a tag in the middle of the line, you probably don't want to insert a newline, I think? So perhaps just adding that defcustom is the right option... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no