From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Native display of line numbers: visual line-counting Date: Sun, 25 Jun 2017 16:20:30 -0400 Message-ID: References: <83podttfpy.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1498422082 21274 195.159.176.226 (25 Jun 2017 20:21:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 20:21:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Joseph Garvin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 25 22:21:17 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 1dPE1w-00051Q-75 for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 22:21:12 +0200 Original-Received: from localhost ([::1]:43731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPE21-0001ST-5m for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 16:21:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPE1N-0001R8-Oy for emacs-devel@gnu.org; Sun, 25 Jun 2017 16:20:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPE1I-00075j-Rz for emacs-devel@gnu.org; Sun, 25 Jun 2017 16:20:37 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:36013) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dPE1I-00075J-KA for emacs-devel@gnu.org; Sun, 25 Jun 2017 16:20:32 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DuCQCTGlBZ/w+NCkxdHAEBBAEBCgEBg1iFEIVXhgCQaxAbAZdfhh4EAgKDB0QUAQIBAQEBAQEBayiFGQEEAVYjBQsLNBIUGA0kijcIs3WLTgEBCAImgyeFLYMkil4BBJ5pnnOHBpNdgUQ2IYEKMCEIMId0JIofAQEB X-IPAS-Result: A0DuCQCTGlBZ/w+NCkxdHAEBBAEBCgEBg1iFEIVXhgCQaxAbAZdfhh4EAgKDB0QUAQIBAQEBAQEBayiFGQEEAVYjBQsLNBIUGA0kijcIs3WLTgEBCAImgyeFLYMkil4BBJ5pnnOHBpNdgUQ2IYEKMCEIMId0JIofAQEB X-IronPort-AV: E=Sophos;i="5.39,392,1493697600"; d="scan'208";a="318393205" Original-Received: from 76-10-141-15.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([76.10.141.15]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Jun 2017 16:20:30 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 1717CAE0BB; Sun, 25 Jun 2017 16:20:30 -0400 (EDT) In-Reply-To: (Joseph Garvin's message of "Sun, 25 Jun 2017 14:31:43 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:215978 Archived-At: > 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. The problem I was alluding to is that the efficient way for the redisplay to provide relative visual-line numbers (i.e. working directly on the matrices) would provide a semantics which I'm not sure matches faithfully the functions available to Elisp (e.g. vertical-motion). So, this argues for the use of the more expensive move_it_* functions to compute the relative visual-line numbers (IIUC these are also easier to integrate in the current code, according to Eli). Stefan