From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Native display of line numbers, improved Date: Sun, 25 Jun 2017 16:34:01 +0200 Message-ID: <87k240xhk6.fsf@rosalinde> References: <83tw35thxw.fsf@gnu.org> <87tw35cc70.fsf@rosalinde> <83injktb9p.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1498401289 24773 195.159.176.226 (25 Jun 2017 14:34:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 14:34:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 25 16:34:46 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 1dP8cf-0006Bo-73 for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 16:34:45 +0200 Original-Received: from localhost ([::1]:42789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP8ck-0006sB-2e for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 10:34:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP8c4-0006rs-Tj for emacs-devel@gnu.org; Sun, 25 Jun 2017 10:34:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dP8c1-0001oV-NB for emacs-devel@gnu.org; Sun, 25 Jun 2017 10:34:08 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:64666) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dP8c1-0001nJ-CO; Sun, 25 Jun 2017 10:34:05 -0400 Original-Received: from rosalinde ([83.135.20.144]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mdren-1d8J4p1lm9-00PcsJ; Sun, 25 Jun 2017 16:34:02 +0200 In-Reply-To: <83injktb9p.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 25 Jun 2017 17:03:30 +0300") X-Provags-ID: V03:K0:694KgI2h0l5C8w+ski5Xeqer8PIA26UPNfvQ9G9qspCby/DJSZx psIDPULyNTCVZO1j5QGnUydIcW27kLs6c1wYxlhJ3hSWWxLJyGfhZPZbVLON7v7zMRBjhh5 luKXC0/BBuMz5pPyEx1Liy9nGrlZ+VkQq/UWTh2kFYErc6UkBWDoUx/rJEjIkPRCMK9VDI1 vvxczOUH06TBcnbKKY5JA== X-UI-Out-Filterresults: notjunk:1;V01:K0:KcqrzmzBzJ0=:Kfn0/a+4CQYPMqKEsSlDEg E+so4pum5Lm2h5yt71WDV7KmnRURsDOJKC+OgbEwndv2Z8tHAtqJ998Nf7EuZJT3/QPVM9a8H rYnEm+QMn/xXt5B8VLtIs0yDp3+O17cERrR/hjh81+ZZtEjVZhBOmkmvk5NkvqJikcsQlWa4C k8Cl2oSdFrZzaav4HiIcMEXtV4wg0h2Lzl1T0oxchzyY7Kvn5AMHaq34663H+z4FIA1lKuli2 9Pct3eTzxeog2zR+XwAMxudkrOL5XFtNNj3W6ZWEi+SmAjtQ3Goroav+KKtUZsfx4gRFW5PpC DJbm4sqoQDDrseTcZUikhE1PG67mMlds0fVndWZSBRxUPUeq7qZ1IXY0MiZl7IwpW4kRd3IEA 2tkhheV0lfxNPuCMdFvAPUC72u4cDAtC8Qt90iGhT+t1njOEXanR3VevmjtSWoX6gcuCSVpd1 3n8kVmczkzDlvLCNlLldTZslZjUnklhQ0wR2hpVDAKYahiU6qb7PFKPhulT9ryqJ0Hw/CoYm9 gx5tvhw4Qe38Vl+/odH+KKzdvAdiQN4rQkNrCY5IUE/8phDraVa/arT3/oez8wHq3uT6/6LVY 7jJWBtlCajVLixRjOP3Cw2XU2agwf327vKpHODAhhoWcXbmfbVXSW7OtBTQq2TssxocEaDk1z /XVPi5v/ug6QqeO60ZSHSoz8108HWP1xtls0AOK6oaCLPANCCdArbEcM59NpIhczvlrC25Fxq P0/k1tVOakxqLTkJLl7jnMdUbmDb4WFqSaHiJFHGtB2+xP863/wWLZqHFf6iJpZPTBcHZv8H X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 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:215958 Archived-At: On Sun, 25 Jun 2017 17:03:30 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: emacs-devel@gnu.org >> Date: Sat, 24 Jun 2017 23:23:15 +0200 >> >> When the buffer ends with a newline and point is on it, no line number >> is displayed on the left, though with line-number-mode enabled the mode >> line does display the line number. > > By "point is on it", I guess you mean point is at EOB, i.e. beyond the > last character position? Because otherwise, I don't think I see what > you describe. Yes, I meant at EOB. > If this is about point at EOB, then this is the intended behavior: the > "line" where we position cursor in that case doesn't exist, so it > would be IMO incorrect to count it. By that reasoning, line-number-mode (the %l construct) should be changed so as not to display a number when point is at EOB. Perhaps it should display "EOB" or "END" instead. > I'd prefer to leave the code > simple, without all kinds of subtleties whose sole purpose is to add > minor aesthetic sugar. It's not a big deal for sure, though it seems at first sight unintuitive that if the buffer ends with a sequence of newlines, all but the last will be numbered (especially when the last one is also numbered in the mode line). Steve Berman