[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About column numbers

From: Stefan Monnier
Subject: Re: About column numbers
Date: Thu, 31 Mar 2016 08:50:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> So it’s mostly useless in a 0-based character-counting editor, and

Not exactly.  It just means that we can use the number without some
extra massaging, such as taking into account compilation-first-column or
compilation-error-screen-columns (AFAIK there is currently no
corresponding support for distinguishing bytes/chars, even though it'd
be clearly beneficial).

But in any case this part of compile.el is a big mess, because every
tool out there uses another convention in this regard and
compilation-error-regexp-alist doesn't record which tool uses
which convention.


PS: If you like to bikeshed about counting from 0-vs-1, I have another
one for you: point-min should start at 0 rather than at 1.  And this one
could mostly be done without breaking too much code out there (it would
break some code, but most of it is already fundamentally broken because
it should use `point-min` rather than hardcoding 1, so it's not *that*
terrible).  This aid, if you try to set BEG to 0, you'll soon discover
that Emacs's C code is not prepared for that.  Patches welcome ;-)
BTW: Making such a change would slightly simplify the src/intervals.c code
since text-properties are used both on strings (start at 0) and buffers
(start at 1).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]