From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Filipe Silva Newsgroups: gmane.emacs.devel Subject: Re: Native display of line numbers Date: Thu, 22 Jun 2017 12:46:27 -0300 Message-ID: References: <83lgoqzm0v.fsf@gnu.org> <83injouj5v.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113caa4446930205528e6307" X-Trace: blaine.gmane.org 1498146438 13645 195.159.176.226 (22 Jun 2017 15:47:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Jun 2017 15:47:18 +0000 (UTC) Cc: Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 22 17:47:14 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 1dO4K9-00037o-F7 for ged-emacs-devel@m.gmane.org; Thu, 22 Jun 2017 17:47:13 +0200 Original-Received: from localhost ([::1]:59677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO4K8-0007YB-Ok for ged-emacs-devel@m.gmane.org; Thu, 22 Jun 2017 11:47:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO4JU-0007Y5-2r for emacs-devel@gnu.org; Thu, 22 Jun 2017 11:46:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO4JS-0003z8-Sj for emacs-devel@gnu.org; Thu, 22 Jun 2017 11:46:32 -0400 Original-Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:35347) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dO4JQ-0003yL-WD; Thu, 22 Jun 2017 11:46:29 -0400 Original-Received: by mail-oi0-x233.google.com with SMTP id c189so11225694oia.2; Thu, 22 Jun 2017 08:46:28 -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=g2273gbEZRN4N51S99ReC9fP/dMFkwTAChdoiNs/Uo8=; b=QwgTA7XfhxfBQ6iKjo70HrVDoPjNKMwBYv5b2ZtLHSEBehFY8RSZVGjW2wibqHUPWx YdKhqi7AQH+EIC8ICmBLLwSJfk6AL3f4RDmCGSiUaXnbzSk1KNG8gATooEHxSmixe8oP xLetg1QWhRdYxQtqCQQo3P1t1QASmWkN5cpK++1ktd0hztTCEXMOxncDIO/j7iYiClxO R/PdYuAqsy0A4JzKwGA8XvxOeI7jgm/uX6YBJ+Kj4JhR1cOfQ4woeSkwYfclbZHo4Izc TMwl8M1vzp/ISkYbqbgNgwHjhorL5FspYlNh6ukafmcb3UaFwHj7kSO9PXkgXus7k0SF CVjw== 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=g2273gbEZRN4N51S99ReC9fP/dMFkwTAChdoiNs/Uo8=; b=hq0CyAf9ibzQsFoltBqm5MY0sOm3SnRZFlqdRgkTPShdm60qxceQ5msoIsqfUczxuO Ll7pZ0ZfeYEX51lrLh/muIwAzxYgKHkrrInSIExotJIdL65zpd0OM2nFfJ3sxpwq3bmG 7bp4TKAnPqx9meFFY0oLhstb79A5hMNEn41mKf/qwmj4s3HKhAGTUM0uCIlnCMXzbOmP 9DoK5oXnHHPpJc7qs4pUjeR1aHObIR9yT9YmqXlvt6qw1VuVv/uefC72rxyN9Mtpowh6 PXbzGeVEmcwJF0FRvf5osr4beSiBMERI64hwYS1IguARYYNl5y9XnMVLKIxCTGtYVHX5 N/Xg== X-Gm-Message-State: AKS2vOwS6r04i8UOExKCXGljs2dzIg/WjtvrKPP76lG6o9VTYeTgJ/ob 4RhbYSESZWbQLpD7vjksoHms/MMgug== X-Received: by 10.202.182.11 with SMTP id g11mr1842062oif.98.1498146387953; Thu, 22 Jun 2017 08:46:27 -0700 (PDT) Original-Received: by 10.157.51.8 with HTTP; Thu, 22 Jun 2017 08:46:27 -0700 (PDT) Original-Received: by 10.157.51.8 with HTTP; Thu, 22 Jun 2017 08:46:27 -0700 (PDT) In-Reply-To: <83injouj5v.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::233 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:215885 Archived-At: --001a113caa4446930205528e6307 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Eli, I understand, thank you. the only package that tries to do what I have just describe is an abandoned package from github user fanael. It has bugs and performance issues that render it unusable. here is the link: https://github.com/Fanael/relative-line-numbers/issues/3 On Jun 22, 2017 12:38 PM, "Eli Zaretskii" wrote: > > From: Filipe Silva > > Date: Thu, 22 Jun 2017 12:02:55 -0300 > > Cc: Emacs developers > > > > Eli > > =E2=80=8B, thanks so much for your work on this. I means a lot to have = this > feature implemented in the timeless editor. > > > > I'm an evil-mode user and this is one of the features I miss most in > vim: relative line numbers. But let me be > > more clear: > > > > Vim implements=E2=80=8B relative line numbers in a way that the "relati= vity" > aspect is based on the visible lines of the > > buffer. > > > > This means that, for example, in an org-mode buffer, where you have a > bunch of lines collpsed, you would > > number those visible lines with numbers relative to the line of point, > and not based on the "real" relativity. > > Yes, this was already requested. I understand that there are no Emacs > packages that offer this feature right now, is that right? > > Anyway, implementing this will need to code a whole different method > of counting lines (the current branch just reuses the same code which > produces the line numbers in the mode line), so I will need to > experiment to see if it can be implemented fast enough to avoid > slowing down redisplay, which is already slower in folded buffers. > IOW, this feature will take some time to implement correctly. > > Thanks for the feedback. > --001a113caa4446930205528e6307 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Eli, I understand, thank you.

the only package that tries to do what I have just des= cribe is an abandoned package from github user fanael. It has bugs and perf= ormance issues that render it unusable.

here is the link:=C2=A0https://github.com/Fanael/relative-line-nu= mbers/issues/3

On Jun 22, 2017 12:38 PM, "Eli Zaretskii" <eliz@gnu.org> wrote:
> From: Filipe Silva <filipe.silva@gmail.com>
> Date: Thu, 22 Jun 2017 12:02:55 -0300
> Cc: Emacs developers <emacs-= devel@gnu.org>
>
> Eli
> =E2=80=8B, thanks so much for your work on this. I means a lot to have= this feature implemented in the timeless editor.
>
> I'm an evil-mode user and this is one of the features I miss most = in vim: relative line numbers. But let me be
> more clear:
>
> Vim implements=E2=80=8B relative line numbers in a way that the "= relativity" aspect is based on the visible lines of the
> buffer.
>
> This means that, for example, in an org-mode buffer, where you have a = bunch of lines collpsed, you would
> number those visible lines with numbers relative to the line of point,= and not based on the "real" relativity.

Yes, this was already requested.=C2=A0 I understand that there are no Emacs=
packages that offer this feature right now, is that right?

Anyway, implementing this will need to code a whole different method
of counting lines (the current branch just reuses the same code which
produces the line numbers in the mode line), so I will need to
experiment to see if it can be implemented fast enough to avoid
slowing down redisplay, which is already slower in folded buffers.
IOW, this feature will take some time to implement correctly.

Thanks for the feedback.
--001a113caa4446930205528e6307--