GNU bug report logs - #52329
Fix alignment of makefile-backslash-region

Previous Next

Package: emacs;

Reported by: Fredrik Bergroth <fbergroth <at> gmail.com>

Date: Mon, 6 Dec 2021 13:03:01 UTC

Severity: normal

Tags: patch

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 52329 in the body.
You can then email your comments to 52329 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#52329; Package emacs. (Mon, 06 Dec 2021 13:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fredrik Bergroth <fbergroth <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 06 Dec 2021 13:03:02 GMT) Full text and rfc822 format available.

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

From: Fredrik Bergroth <fbergroth <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Fix alignment of makefile-backslash-region
Date: Mon, 6 Dec 2021 14:02:35 +0100
[Message part 1 (text/plain, inline)]
Hi,

`makefile-backslash-region' is inserting tabs rather than spaces (due to
the major mode setting indent-tabs-mode).
The backslashes won't align properly (unless everyone agrees on a
tab-width). I attached a patch that fixes this.

Cheers!
[Message part 2 (text/html, inline)]
[0001-Fix-alignment-of-makefile-backslash-region.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52329; Package emacs. (Mon, 06 Dec 2021 13:55:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Fredrik Bergroth <fbergroth <at> gmail.com>
Cc: 52329 <at> debbugs.gnu.org
Subject: Re: bug#52329: Fix alignment of makefile-backslash-region
Date: Mon, 6 Dec 2021 14:54:47 +0100
Fredrik Bergroth <fbergroth <at> gmail.com> writes:

> `makefile-backslash-region' is inserting tabs rather than spaces (due to the major mode setting indent-tabs-mode).
> The backslashes won't align properly (unless everyone agrees on a tab-width). I attached a patch that fixes this.

Thanks for the patch.

Could you provide a recipe to reproduce this problem, preferably
starting from "emacs -Q"?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52329; Package emacs. (Mon, 06 Dec 2021 14:08:02 GMT) Full text and rfc822 format available.

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

From: Fredrik Bergroth <fbergroth <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 52329 <at> debbugs.gnu.org
Subject: Re: bug#52329: Fix alignment of makefile-backslash-region
Date: Mon, 6 Dec 2021 15:07:17 +0100
[Message part 1 (text/plain, inline)]
Sure!

emacs -Q --eval '(makefile-mode)' --eval '(insert "a\nbbbbb\ncc")' --eval
'(mark-whole-buffer)' --eval "(call-interactively
'makefile-backslash-region)"

This will end up with a bunch of tabs (rather than spaces) after the "a"
and the b:s. If you now change tab-width to 2, the backslashes won't align.

Den mån 6 dec. 2021 kl 14:54 skrev Stefan Kangas <stefan <at> marxist.se>:

> Fredrik Bergroth <fbergroth <at> gmail.com> writes:
>
> > `makefile-backslash-region' is inserting tabs rather than spaces (due to
> the major mode setting indent-tabs-mode).
> > The backslashes won't align properly (unless everyone agrees on a
> tab-width). I attached a patch that fixes this.
>
> Thanks for the patch.
>
> Could you provide a recipe to reproduce this problem, preferably
> starting from "emacs -Q"?
>
[Message part 2 (text/html, inline)]

Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Tue, 07 Dec 2021 14:11:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52329; Package emacs. (Thu, 08 Sep 2022 14:33:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Fredrik Bergroth <fbergroth <at> gmail.com>
Cc: 52329 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#52329: Fix alignment of makefile-backslash-region
Date: Thu, 08 Sep 2022 16:32:25 +0200
Fredrik Bergroth <fbergroth <at> gmail.com> writes:

> emacs -Q --eval '(makefile-mode)' --eval '(insert "a\nbbbbb\ncc")' --eval '
> (mark-whole-buffer)' --eval "(call-interactively 'makefile-backslash-region)"
>
> This will end up with a bunch of tabs (rather than spaces) after the
> "a" and the b:s. If you now change tab-width to 2, the backslashes
> won't align.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

The advantage of using TABs for alignment here, though, is that if you
then adjust some of the text slightly, you won't need to adjust the
alignment.

Which is much more common than altering tab-width, so I don't think we
want to do this change, and I'm therefore closing this bug report.




bug closed, send any further explanations to 52329 <at> debbugs.gnu.org and Fredrik Bergroth <fbergroth <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 08 Sep 2022 14:33: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. (Fri, 07 Oct 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 173 days ago.

Previous Next


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