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: Sun, 25 Jun 2017 14:31:43 -0500 Message-ID: References: <83podttfpy.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045fb4aa740de20552cde23f" X-Trace: blaine.gmane.org 1498419192 23402 195.159.176.226 (25 Jun 2017 19:33:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 19:33:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 25 21:33:07 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 1dPDHM-0005e5-Sk for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 21:33:04 +0200 Original-Received: from localhost ([::1]:43598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPDHQ-0005Tf-IR for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 15:33:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPDG8-0005IR-Ml for emacs-devel@gnu.org; Sun, 25 Jun 2017 15:31:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPDG7-0007OO-QZ for emacs-devel@gnu.org; Sun, 25 Jun 2017 15:31:48 -0400 Original-Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:34328) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPDG7-0007NG-JD for emacs-devel@gnu.org; Sun, 25 Jun 2017 15:31:47 -0400 Original-Received: by mail-lf0-x22f.google.com with SMTP id l13so51246830lfl.1 for ; Sun, 25 Jun 2017 12:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=U0JMSeCRm0j4l9HnbcG0DyeCwUCCb2Zpb3OeXZtTek0=; b=R5WGl3YOerPjfeikHxeby/mE35E0Vhs8hSxNU9h0B9UJ+ZYsiidpqaPjQhYauV9/HO i79lVX4AFnAeOWnmCNRzVvmMHF0uGzD1+EzK3t5PW80Hq3PXdRncGqF+v43FDXNFWrPz y7HqGNqUvKwG/39y9+6sdl8XKLgmRapLQ1N2XWo+qWqpD6X/sxhPqBChprtPXGTfaaKp YMu5fdr914jHXe7iiDMrxvbjMvS0vdcEpBXCWVmb4j92do7wVkN9pLQukLo5SWBztcId 29KBKhKvr3+JcxzmTAdfyfCAaSt5UY00Bs722C/jELGMClV/1hpahKYV97olDcpqKnl3 fyAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=U0JMSeCRm0j4l9HnbcG0DyeCwUCCb2Zpb3OeXZtTek0=; b=hMjAqV3ya/BsUOJklvb0wNBnE2B6YU6nd/I1VoSRct/aqkmLbhPcr7R/iVzDr/Yfj3 yZGlElIOkhCxneMcUrKrjsBW+oUGnCOCSsF3ex/RLTE5lUirmt8FMSGk8+NJbv0TM+j/ 0iM8QWqRaxFFFNalq0YWmobrhAaf8Zy1o87OcB6qblguaNO4eXn21jxqqQhHLRpoIjaG 4HqIungcPnKuGaLbwXkuzEIuwGeEKUoJ1QmLx8NaFIc6w1DRFtNqy/T0gU5473zpBr+5 xWvr6Y2JFt53tiX+h+MWWz46uSXbmw1dzsW2/M4Ydbas1guJzZTxFdhhL/TIiIkPWayj Ogiw== X-Gm-Message-State: AKS2vOyrPeC05+K/PqWMyvSpNpfOgnh6vVxaauTnwHYEzG42nh1cIuFB HHAjI0fHEvjVIN7rxIffBvqk+sH8Bw== X-Received: by 10.46.20.11 with SMTP id u11mr5140719ljd.11.1498419104580; Sun, 25 Jun 2017 12:31:44 -0700 (PDT) Original-Received: by 10.25.41.72 with HTTP; Sun, 25 Jun 2017 12:31:43 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: zQHT5-1TP7JWZWsmuwnyG7Tw06s X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22f 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:215976 Archived-At: --f403045fb4aa740de20552cde23f Content-Type: text/plain; charset="UTF-8" On Sun, Jun 25, 2017 at 2:16 PM, Stefan Monnier 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. > > Indeed, it's non-trivial. E.g. if it's used for things like "go up > N lines", then it's important to make sure that the notion of "visual > line" is exactly the same for the "go up N lines" command as it is for > the line-number display code. I take it for granted when using emacs that there is some configuration work involved. As long as there is a function I can bind for up/down that matches the the relative line numbering, it's not super important to me that they automatically are synced somehow. FWIW, visual line mode automagically rebinds the navigation keys already, so if the relative line numbering was just labeling the lines as visual line mode renders them, rendering and input should line up. --f403045fb4aa740de20552cde23f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Jun 25, 2017 at 2:16 PM, Stefan Monnier <<= a href=3D"mailto:monnier@iro.umontreal.ca" target=3D"_blank">monnier@iro.um= ontreal.ca> wrote:
> So a few people requested this feature, and I started thinkin= g about
> its implementation.=C2=A0 Immediately I bumped into several issues tha= t I'm
> not sure how to resolve, since I don't really understand how this = will
> be used in Emacs.

Indeed, it's non-trivial.=C2=A0 E.g. if it's used for things= like "go up
N lines", then it's important to make sure that the notion of &quo= t;visual
line" is exactly the same for the "go up N lines" command as= it is for
the line-number display code.

I take it for= granted when using emacs that there is some configuration work involved. A= s long as there is a function I can bind for up/down that matches the the r= elative line numbering, it's not super important to me that they automa= tically are synced somehow. FWIW, visual line mode automagically rebinds th= e navigation keys already, so if the relative line numbering was just label= ing the lines as visual line mode renders them, rendering and input should = line up.

--f403045fb4aa740de20552cde23f--