From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: About column numbers Date: Thu, 31 Mar 2016 08:50:37 -0400 Message-ID: References: <56FB02BB.3090501@alice.it> <83wpokuh3a.fsf@gnu.org> <56FC0CDB.9090707@alice.it> <87poubvnhh.fsf@linux-m68k.org> <87lh4zvlp2.fsf@linux-m68k.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1459428693 18034 80.91.229.3 (31 Mar 2016 12:51:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 12:51:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 31 14:51:19 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1alc4B-0007kN-2s for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 14:51:15 +0200 Original-Received: from localhost ([::1]:60225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alc4A-00019n-Eq for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 08:51:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alc3s-00019g-Bz for emacs-devel@gnu.org; Thu, 31 Mar 2016 08:51:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alc3p-0002lh-1g for emacs-devel@gnu.org; Thu, 31 Mar 2016 08:50:56 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:57173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alc3o-0002lX-Rf for emacs-devel@gnu.org; Thu, 31 Mar 2016 08:50:52 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1alc3k-0007Vd-I8 for emacs-devel@gnu.org; Thu, 31 Mar 2016 14:50:48 +0200 Original-Received: from 45.72.141.202 ([45.72.141.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Mar 2016 14:50:43 +0200 Original-Received: from monnier by 45.72.141.202 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Mar 2016 14:50:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 45.72.141.202 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:nju2ErtW1JaQbqR+aL3HG78tGko= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202499 Archived-At: > 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).