GNU bug report logs - #33183
perl-mode: indent-region injects spaces after newlines causing data loss

Previous Next

Package: emacs;

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

Date: Sun, 28 Oct 2018 01:59:01 UTC

Severity: minor

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33183 in the body.
You can then email your comments to 33183 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#33183; Package emacs. (Sun, 28 Oct 2018 01:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 28 Oct 2018 01:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: perl-mode: indent-region injects spaces after newlines causing data
 loss
Date: Sun, 28 Oct 2018 08:56:47 +0800
In perl-mode

%fields = (
    u =>
    'test
ing' . q{test
2} .
    qq/last
test/ );

becomes

%fields = (
    u =>
    'test
    ing' . q{test
    2} .
    qq/last
    test/ );

after running indent-region, on the region. However

my $x= 'new
    line';
my $y= q{new
    line};

is unaffected, thankfully.
emacs-version "25.2.2"

Also wrecks
     u =>
    <<EOF
nnnn
xxxx
EOF

P.S., takes a lot of work to repair wrecked areas. One form of data loss!

In fact it even wrecks top level here-docs:
my $x = <<EOF;
nnnn
xxxx
EOF

will get wrecked.

Also wrecks
sub mq{
    return "a
b";}




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33183; Package emacs. (Wed, 09 Dec 2020 17:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 33183 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 33183 <at> debbugs.gnu.org
Subject: Re: bug#33183: perl-mode: indent-region injects spaces after
 newlines causing data loss
Date: Wed, 09 Dec 2020 18:33:09 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> In perl-mode
>
> %fields = (
>     u =>
>     'test
> ing' . q{test
> 2} .
>     qq/last
> test/ );
>
> becomes
>
> %fields = (
>     u =>
>     'test
>     ing' . q{test
>     2} .
>     qq/last
>     test/ );
>
> after running indent-region, on the region. However

I can reproduce this in Emacs 26, but not in Emacs 28, so I guess this
has been fixed in the years since this was reported, and I'm closing
this bug report.  

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




bug closed, send any further explanations to 33183 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 09 Dec 2020 17:34:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 07 Jan 2021 12:24:10 GMT) Full text and rfc822 format available.

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

Previous Next


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