all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: About column numbers
Date: Thu, 31 Mar 2016 08:50:37 -0400	[thread overview]
Message-ID: <jwvbn5u6cnu.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: CAP_d_8WSBJMZ2aLbnUwiRh1-ieG9mdcTyE-TnFo5AF+hE+_GyA@mail.gmail.com

> 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).




  reply	other threads:[~2016-03-31 12:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 22:33 About column numbers Angelo Graziosi
2016-03-30  5:43 ` psachin
2016-03-30 15:21 ` Eli Zaretskii
2016-03-30 17:28   ` Angelo Graziosi
2016-03-30 17:46     ` Drew Adams
2016-04-03 23:15       ` John Wiegley
2016-03-30 18:02     ` Yuri Khan
2016-03-30 18:18       ` Andreas Schwab
2016-03-30 18:37         ` Yuri Khan
2016-03-30 18:56           ` Andreas Schwab
2016-03-30 19:17             ` Yuri Khan
2016-03-31 12:50               ` Stefan Monnier [this message]
2016-03-31 16:44                 ` Clément Pit--Claudel
2016-03-31 21:39                   ` Stefan Monnier
2016-04-02 16:29                     ` Elias Mårtenson
2016-04-02 20:19                       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvbn5u6cnu.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.