GNU bug report logs - #52864
sgml-tag inserts newlines

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 29 Dec 2021 03:19:02 UTC

Severity: minor

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 52864 <at> debbugs.gnu.org, 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: bug#52864: sgml-tag inserts newlines
Date: Wed, 29 Dec 2021 16:32:56 +0100
Juri Linkov <juri <at> linkov.net> writes:

>>   (add-hook 'sgml-mode-hook
>>             (lambda ()
>>               ;; Don't insert newlines after <tag></tag>
>>               (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




This bug report was last modified 3 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.