From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Native display of line numbers: visual line-counting Date: Sat, 24 Jun 2017 21:15:05 +0300 Message-ID: <83podttfpy.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1498328145 19903 195.159.176.226 (24 Jun 2017 18:15:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Jun 2017 18:15:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 24 20:15:42 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 1dOpav-0004yC-1O for ged-emacs-devel@m.gmane.org; Sat, 24 Jun 2017 20:15:41 +0200 Original-Received: from localhost ([::1]:40097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOpb0-00028h-2Q for ged-emacs-devel@m.gmane.org; Sat, 24 Jun 2017 14:15:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOpat-00028R-Dy for emacs-devel@gnu.org; Sat, 24 Jun 2017 14:15:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOpaq-000489-AK for emacs-devel@gnu.org; Sat, 24 Jun 2017 14:15:39 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOpaq-00047p-5f for emacs-devel@gnu.org; Sat, 24 Jun 2017 14:15:36 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2168 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dOpao-0006AW-38 for emacs-devel@gnu.org; Sat, 24 Jun 2017 14:15:35 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:215938 Archived-At: 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