GNU bug report logs - #15875
24.3.50; diff-mode counts first column when determining tab width

Previous Next

Package: emacs;

Reported by: Nathan Trapuzzano <nbtrap <at> nbtrap.com>

Date: Tue, 12 Nov 2013 13:36:02 UTC

Severity: wishlist

Found in version 24.3.50

To reply to this bug, email your comments to 15875 AT debbugs.gnu.org.

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#15875; Package emacs. (Tue, 12 Nov 2013 13:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nathan Trapuzzano <nbtrap <at> nbtrap.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 12 Nov 2013 13:36:02 GMT) Full text and rfc822 format available.

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

From: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; diff-mode counts first column when determining tab width
Date: Tue, 12 Nov 2013 08:34:12 -0500
In diff-mode, When determining how many columns wide a given tab
character should be, the calculation should happen as thought the second
column were the first.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15875; Package emacs. (Tue, 12 Nov 2013 15:50:03 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Cc: 15875 <at> debbugs.gnu.org
Subject: Re: bug#15875: 24.3.50;
 diff-mode counts first column when determining tab width
Date: Tue, 12 Nov 2013 10:49:25 -0500
severity 15875 wishlist
thanks

> In diff-mode, When determining how many columns wide a given tab
> character should be, the calculation should happen as thought the second
> column were the first.

Indeed.  Maybe we could get something like that by adding a `tab-offset'
so that TAB chars insert a strechable space to the next
(+ (* tab-width N) tab-offset) instead of just the next (* tab-width N).

Then we can make diff-mode set this tab-offset based on whether we're
looking at a unified or plain or context diff (or a Git-style
multi-diffs, i.e. unified but with more than 2 versions, where each
additional version adds a column of +/-).

Note that diff-mode also handles diffs that have a mix of context-style
and unified-style hunks, but such a tab-offset feature wouldn't be able
to handle it correctly.  Not a big issue, tho.


        Stefan




Severity set to 'wishlist' from 'normal' Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Tue, 12 Nov 2013 15:50:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15875; Package emacs. (Tue, 12 Nov 2013 15:53:02 GMT) Full text and rfc822 format available.

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

From: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15875 <at> debbugs.gnu.org
Subject: Re: bug#15875: 24.3.50;
 diff-mode counts first column when determining tab width
Date: Tue, 12 Nov 2013 10:52:15 -0500
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Note that diff-mode also handles diffs that have a mix of context-style
> and unified-style hunks, but such a tab-offset feature wouldn't be able
> to handle it correctly.  Not a big issue, tho.

What if the tab width were a text property instead of a buffer variable?
(Or perhaps it coulbe be both, with the latter overriding the former.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15875; Package emacs. (Tue, 12 Nov 2013 16:33:03 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Cc: 15875 <at> debbugs.gnu.org
Subject: Re: bug#15875: 24.3.50;
 diff-mode counts first column when determining tab width
Date: Tue, 12 Nov 2013 11:32:31 -0500
>> Note that diff-mode also handles diffs that have a mix of context-style
>> and unified-style hunks, but such a tab-offset feature wouldn't be able
>> to handle it correctly.  Not a big issue, tho.
> What if the tab width were a text property instead of a buffer variable?

Seems overkill.  The `space' display property already provides pretty
much that (among other things).


        Stefan




This bug report was last modified 11 years and 214 days ago.

Previous Next


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