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 15:13:32 -0500 Message-ID: References: <83podttfpy.fsf@gnu.org> <83mv8xtclh.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113f1d6423c2800552ba5a10" X-Trace: blaine.gmane.org 1498339345 30811 195.159.176.226 (24 Jun 2017 21:22:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Jun 2017 21:22:25 +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 23:22:21 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 1dOsVX-0007gM-BL for ged-emacs-devel@m.gmane.org; Sat, 24 Jun 2017 23:22:19 +0200 Original-Received: from localhost ([::1]:40482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOsVc-0008RN-In for ged-emacs-devel@m.gmane.org; Sat, 24 Jun 2017 17:22:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOrR4-0001et-Cw for emacs-devel@gnu.org; Sat, 24 Jun 2017 16:13:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOrR3-0001Cy-6B for emacs-devel@gnu.org; Sat, 24 Jun 2017 16:13:38 -0400 Original-Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:34797) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOrR1-0001AJ-1p; Sat, 24 Jun 2017 16:13:35 -0400 Original-Received: by mail-lf0-x233.google.com with SMTP id l13so44936822lfl.1; Sat, 24 Jun 2017 13:13:34 -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=Vk/EZBpmvLsaG0iVhCFA7teKgWnpw2VPBcKCnszJixI=; b=vHPyGzoiyc+FSLiMeTMUB8MLytzOG8+B7PsVfUcpijQ/6Jef4ZXFM7TZJo2ZlqzwD5 1VduPAJ7NPSBekIG0PtDbg6YY6cSpm5caVwTVP+Zf0XvgXciD7+5zdrDcM8LjWuvmxuV w5Z6HD4DLUk3SS2gkJwsVbYBtDRrzqzmk91F9WqA5gml9YcJD220vDoL84IDkbP6SZbB dLcV8NZglDBC1FeaR+GWL/+gminmVjz+B/ejTMiBIe9dNx7eBqRMGWnLrTU7/cgVmmxo BwqipGc/h++I1I6lZasVaUE37/s7oN25CBja36B74tg0ZIa+l2Ce0ehh/lcN+qXe+bIr CA5Q== 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=Vk/EZBpmvLsaG0iVhCFA7teKgWnpw2VPBcKCnszJixI=; b=ApNPX6f4Z0L+8BwPydviqOXUvc8XLMF98lTdlrucRYavOgoyDIA7K1mgHpAXrZkcMm bHYOllxltDLMCdimoaS/qngl+N2S0ev+GAW91YoPtwdjlJeQol9597hr1PQyUrEgvieE WsrwMIbrcacd/9ADNse+5p6RUzsa1XnUTOFNpfLgfBXZ9mrpNBFsRfwHbzL5zmMO7+z5 oM7L8YfBoLnbpobNRIFnwPOVAhUqxwzrmLbEiAXuw4FR3Pwx0sG4x8TKYVixL+gR5HJj HdUJ77wZbVM0ks5UgJdvJFEpb/kCI8/i101nD9bZbbFPmlKS7mzmvSwG1CpMY/+gQ+da AmYQ== X-Gm-Message-State: AKS2vOwTpocd4dXUT7W994keIlMX3ZloL4MJtELncsH1y/Y9UojM1h6O ujHtt03cDZcbx2rUZQpNxboT6aBoWJuf X-Received: by 10.25.39.198 with SMTP id n189mr1162543lfn.145.1498335213238; Sat, 24 Jun 2017 13:13:33 -0700 (PDT) Original-Received: by 10.25.41.72 with HTTP; Sat, 24 Jun 2017 13:13:32 -0700 (PDT) Original-Received: by 10.25.41.72 with HTTP; Sat, 24 Jun 2017 13:13:32 -0700 (PDT) In-Reply-To: <83mv8xtclh.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::233 X-Mailman-Approved-At: Sat, 24 Jun 2017 17:21:34 -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:215945 Archived-At: --001a113f1d6423c2800552ba5a10 Content-Type: text/plain; charset="UTF-8" On Jun 24, 2017 2:22 PM, "Eli Zaretskii" wrote: > From: Joseph Garvin > Date: Sat, 24 Jun 2017 14:03:27 -0500 > Cc: emacs-devel@gnu.org > > 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. What about lines where cursor cannot enter? Are you saying you don't want to count them? I was just trying to illustrate my use case, I didn't mean to imply anything about lines you can't enter. I typically am editing source files where all lines can be entered. But now that you mention it, if for example there was an overlay making it appear as if more lines were in the buffer than there actually were, then yes ideally those would not count. That's not something I run into very often though. A solution that didn't handle this edge case but otherwise had relative visual line numbers would still be a big improvement. Also, you seem to be saying that lines that span multiple screen lines should be counted that many times. If so, the numbers are not really "line numbers" anymore, but something else. >From a text editor programmer's perspective line number may be defined by something like, "number of preceding newline characters" but I think most users think in terms of the lines of text as they are rendered on the display. Most non-emacs editors and IDEs nowadays use wrapping that acts like visual line mode by default. I would call them "visual line numbers." Moreover, these lines cannot be communicated to anyone else, as their window geometry could be different. Relative line numbers already can't be communicated anyway, since the other person would have to have their cursor on the same line. But I don't think users of relative lines are using it for communicating with other people. They're using it so they can more easily plan a series of keystrokes or voice commands that they're going to issue themselves. --001a113f1d6423c2800552ba5a10 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Jun 24, 2017 2:22 PM, "Eli Zaretskii" <eliz@gnu.org> wrote:
<= blockquote class=3D"quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc = solid;padding-left:1ex">> From: Joseph Garvin <k04jg02@gmail.com>
> Date: Sat, 24 Jun 2017 14:03:27 -0500
> Cc: emacs-devel@gnu.org
>
> 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 feat= ure 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.

What about lines where cursor cannot enter?=C2=A0 Are you saying you = don't
want to count them?
I was just trying to illustrate my use case, I did= n't mean to imply anything about lines you can't enter. I typically= am editing source files where all lines can be entered. But now that you m= ention it, if for example there was an overlay making it appear as if more = lines were in the buffer than there actually were, then yes ideally those w= ould not count. That's not something I run into very often though. A so= lution that didn't handle this edge case but otherwise had relative vis= ual line numbers would still be a big improvement.
<= br>

Also, you seem to be saying that lines that span multiple screen lines
should be counted that many times.=C2=A0 If so, the numbers are not really<= br> "line numbers" anymore, but something else.=C2=A0

From a text ed= itor programmer's perspective line number may be defined by something l= ike, "number of preceding newline characters" but I think most us= ers think in terms of the lines of text as they are rendered on the display= . Most non-emacs editors and IDEs nowadays use wrapping that acts like visu= al line mode by default. I would call them "visual line numbers."=

Moreover, these li= nes
cannot be communicated to anyone else, as their window geometry could
be different.

Relati= ve line numbers already can't be communicated anyway, since the other p= erson would have to have their cursor on the same line. But I don't thi= nk users of relative lines are using it for communicating with other people= . They're using it so they can more easily plan a series of keystrokes = or voice commands that they're going to issue themselves.
--001a113f1d6423c2800552ba5a10--