* bug#15875: 24.3.50; diff-mode counts first column when determining tab width
@ 2013-11-12 13:34 Nathan Trapuzzano
2013-11-12 15:49 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Trapuzzano @ 2013-11-12 13:34 UTC (permalink / raw)
To: 15875
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15875: 24.3.50; diff-mode counts first column when determining tab width
2013-11-12 13:34 bug#15875: 24.3.50; diff-mode counts first column when determining tab width Nathan Trapuzzano
@ 2013-11-12 15:49 ` Stefan Monnier
2013-11-12 15:52 ` Nathan Trapuzzano
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-11-12 15:49 UTC (permalink / raw)
To: Nathan Trapuzzano; +Cc: 15875
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15875: 24.3.50; diff-mode counts first column when determining tab width
2013-11-12 15:49 ` Stefan Monnier
@ 2013-11-12 15:52 ` Nathan Trapuzzano
2013-11-12 16:32 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Trapuzzano @ 2013-11-12 15:52 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 15875
Stefan Monnier <monnier@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.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15875: 24.3.50; diff-mode counts first column when determining tab width
2013-11-12 15:52 ` Nathan Trapuzzano
@ 2013-11-12 16:32 ` Stefan Monnier
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2013-11-12 16:32 UTC (permalink / raw)
To: Nathan Trapuzzano; +Cc: 15875
>> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-12 16:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-12 13:34 bug#15875: 24.3.50; diff-mode counts first column when determining tab width Nathan Trapuzzano
2013-11-12 15:49 ` Stefan Monnier
2013-11-12 15:52 ` Nathan Trapuzzano
2013-11-12 16:32 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).