[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.
Stefan
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).
- About column numbers, Angelo Graziosi, 2016/03/29
- Re: About column numbers, psachin, 2016/03/30
- Re: About column numbers, Eli Zaretskii, 2016/03/30
- Re: About column numbers, Angelo Graziosi, 2016/03/30
- RE: About column numbers, Drew Adams, 2016/03/30
- Re: About column numbers, Yuri Khan, 2016/03/30
- Re: About column numbers, Andreas Schwab, 2016/03/30
- Re: About column numbers, Yuri Khan, 2016/03/30
- Re: About column numbers, Andreas Schwab, 2016/03/30
- Re: About column numbers, Yuri Khan, 2016/03/30
- Re: About column numbers,
Stefan Monnier <=
- Re: About column numbers, Clément Pit--Claudel, 2016/03/31
- Re: About column numbers, Stefan Monnier, 2016/03/31