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

Full log


Message #10 received at control <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




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

Previous Next


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