From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joseph Garvin Newsgroups: gmane.emacs.devel Subject: Re: Native display of line numbers: visual line-counting Date: Sat, 24 Jun 2017 14:03:27 -0500 Message-ID: References: <83podttfpy.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045e9ba88b80cd0552b95fa4" X-Trace: blaine.gmane.org 1498332192 22087 195.159.176.226 (24 Jun 2017 19:23:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Jun 2017 19:23:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 24 21:23:08 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOqeB-0005XG-Kn for ged-emacs-devel@m.gmane.org; Sat, 24 Jun 2017 21:23:07 +0200 Original-Received: from localhost ([::1]:40243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOqeG-0008F8-TO for ged-emacs-devel@m.gmane.org; Sat, 24 Jun 2017 15:23:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOqLH-0004sb-Sg for emacs-devel@gnu.org; Sat, 24 Jun 2017 15:03:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOqLG-000765-JX for emacs-devel@gnu.org; Sat, 24 Jun 2017 15:03:35 -0400 Original-Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:35188) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOqLE-00073k-BX; Sat, 24 Jun 2017 15:03:32 -0400 Original-Received: by mail-lf0-x22a.google.com with SMTP id p189so44606862lfe.2; Sat, 24 Jun 2017 12:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gBMz1K6xWgu4fFu3ThbAC5crhjczOLX5+rGheXS7aNM=; b=hnunlkrnLsumVsJbuPW7d/n1wxftS2jUwgmMf+j3nZsXLtSsGEEZI3LFNPQGZ41oEj V7d63c3ICWxGWOJ/vsYyzhs0ky9gTC0iuU6FEcl2PDG7Qs72X/FM9nozFrtHK7ajRuCC /WSZUXt5NHJbo6jYCbRCJ1l2qk5Vrn9Lus1me04O0VGxi3CODVdAnawMTMD30HiXDtjW RLigdwI9UkGE6T8Xk57UjpxxP3uD6XA9iq+A9o0q+FIlhJffJ8tWyKngqfbvZGA9DKuz jRB3kD9zEMEyNiqi3uEYroQLuPl+eu20IPw4dtNf8WzniXvuOvsKhI/ydWLBsDvaQqt0 nZRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gBMz1K6xWgu4fFu3ThbAC5crhjczOLX5+rGheXS7aNM=; b=l8EDXjs2u69WODzWAbJl/5ryr7RQ8sj5WUcCOraFNWFSnwJcxp6mSgARUwlnn40VGg ALOsKJOHPXzYefeuLJnhpy5ZIozfMkgO5c+apvydOORw49raTbYUgpalufO6h0vdHmla MBlUBsu1USzEj55eBymJFULnWg44Z714ZffvxRg6V2yIVkors4V3EQbCrI9OaFnP+Xi6 M7hnwD3Sx+Nosqu14i3HBj0WhZytIDQeikjVWfSXk5PdFOmgcwnKF48TxTRasNINldM5 NxB485oQewAetLVAwK0S+ykIWIFeZJb2w+g9RPql9eHuoS8TBsYei33/smJUpXF51aHc KNew== X-Gm-Message-State: AKS2vOyO7vo2WecaYrNZ9KiDP23CO2g1nzD5zWtaolPs2eZdgvEB8+jk hFaSO6p2zT7ld/TuGVee/dFiLDB/tpf0 X-Received: by 10.25.202.72 with SMTP id h8mr4657275lfj.172.1498331008951; Sat, 24 Jun 2017 12:03:28 -0700 (PDT) Original-Received: by 10.25.41.72 with HTTP; Sat, 24 Jun 2017 12:03:27 -0700 (PDT) Original-Received: by 10.25.41.72 with HTTP; Sat, 24 Jun 2017 12:03:27 -0700 (PDT) In-Reply-To: <83podttfpy.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22a X-Mailman-Approved-At: Sat, 24 Jun 2017 15:23:05 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:215942 Archived-At: --f403045e9ba88b80cd0552b95fa4 Content-Type: text/plain; charset="UTF-8" For my own use of relative line numbers (speech recognition controlled programming) what's important is that the line numbering matches the number of times I'd press the up/down arrow keys or C-p/C-n to move my cursor to the labeled line. The whole reason for me to use the feature is to make it easier by eyeballing to predict where the cursor will land after I say "up 4", "down 7", etc. So I don't care at all about the numbering matching physical lines in the file. This isn't the case with any of the relative line number packages I've tried so far with visual line mode so it'd be awesome to have a reliable mode available. I actually filed a bug against one of the packages awhile back: https://github.com/Fanael/relative-line-numbers/issues/6 On Jun 24, 2017 1:15 PM, "Eli Zaretskii" wrote: > So a few people requested this feature, and I started thinking about > its implementation. Immediately I bumped into several issues that I'm > not sure how to resolve, since I don't really understand how this will > be used in Emacs. > > First, this makes sense only for relative line numbers, right? If not > I don't really understand what would be the definition of "visually > counted first line shown in a window". If everyone agrees, it would > mean that the current line will have the number of zero, right? or do > people still want to see the "physical line number" for the current > line in this case? > > Next, the only use case which I fully understand is the one with > some of the lines folded, as in Org or Outline modes. More > accurately, the case where text is not displayed because it was made > invisible by the 'invisible' property of some kind -- these lines are > not to be counted under this mode. > > But that is not the only case where what is displayed does not > correspond to buffer text 1:1. Some text on the screen might come > from display properties or from before- and after-strings. These can > include embedded newlines, and this contribute to "visual lines" Emacs > displays. Are these lines to be counted or not? Should Emacs display > something for their "line numbers" or not? > > We need to resolve all these and possibly other subtleties before the > feature can be implemented. Ideas and opinions are welcome. > > TIA > > --f403045e9ba88b80cd0552b95fa4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
For my own use of relative line numbers (speech recogniti= on controlled programming) what's important is that the line numbering = matches the number of times I'd press the up/down arrow keys or C-p/C-n= to move my cursor to the labeled line. The whole reason for me to use the = feature is to make it easier by eyeballing to predict where the cursor will= land after I say "up 4", "down 7", etc. So I don't= care at all about the numbering matching physical lines in the file.

This isn't the case with any of= the relative line number packages I've tried so far with visual line m= ode so it'd be awesome to have a reliable mode available. I actually fi= led a bug against one of the packages awhile back:




On Jun 24,= 2017 1:15 PM, "Eli Zaretskii" <eliz@gnu.org> wrote:
So a few people requested this feature, and I started thinking ab= out
its implementation.=C2=A0 Immediately I bumped into several issues that I&#= 39;m
not sure how to resolve, since I don't really understand how this will<= br> be used in Emacs.

First, this makes sense only for relative line numbers, right?=C2=A0 If not=
I don't really understand what would be the definition of "visuall= y
counted first line shown in a window".=C2=A0 If everyone agrees, it wo= uld
mean that the current line will have the number of zero, right?=C2=A0 or do=
people still want to see the "physical line number" for the curre= nt
line in this case?

Next, the only use case which I fully understand is the one with
some of the lines folded, as in Org or Outline modes.=C2=A0 More
accurately, the case where text is not displayed because it was made
invisible by the 'invisible' property of some kind -- these lines a= re
not to be counted under this mode.

But that is not the only case where what is displayed does not
correspond to buffer text 1:1.=C2=A0 Some text on the screen might come
from display properties or from before- and after-strings.=C2=A0 These can<= br> include embedded newlines, and this contribute to "visual lines" = Emacs
displays.=C2=A0 Are these lines to be counted or not?=C2=A0 Should Emacs di= splay
something for their "line numbers" or not?

We need to resolve all these and possibly other subtleties before the
feature can be implemented.=C2=A0 Ideas and opinions are welcome.

TIA

--f403045e9ba88b80cd0552b95fa4--