From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Make mode-line number display consistent when both line and col numbers are shown. Date: Thu, 28 Sep 2017 17:56:50 -0400 Message-ID: Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c080c6022e6b7055a46fe55" X-Trace: blaine.gmane.org 1506635852 14450 195.159.176.226 (28 Sep 2017 21:57:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 28 Sep 2017 21:57:32 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 28 23:57:28 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 1dxgoA-0003HG-Ia for ged-emacs-devel@m.gmane.org; Thu, 28 Sep 2017 23:57:26 +0200 Original-Received: from localhost ([::1]:32834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxgoH-00067D-SC for ged-emacs-devel@m.gmane.org; Thu, 28 Sep 2017 17:57:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxgo9-000662-K3 for emacs-devel@gnu.org; Thu, 28 Sep 2017 17:57:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxgo6-0003iP-GE for emacs-devel@gnu.org; Thu, 28 Sep 2017 17:57:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxgo6-0003iJ-CG for emacs-devel@gnu.org; Thu, 28 Sep 2017 17:57:22 -0400 Original-Received: from mail-qk0-f179.google.com ([209.85.220.179]:45201) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1dxgo6-0008Q8-3W for emacs-devel@gnu.org; Thu, 28 Sep 2017 17:57:22 -0400 Original-Received: by mail-qk0-f179.google.com with SMTP id r141so2869789qke.2 for ; Thu, 28 Sep 2017 14:57:21 -0700 (PDT) X-Gm-Message-State: AMCzsaWyOpauo/kqZBdHZfWrda9bV4ocd1vQcyWRDaeUDPDor0w/3mwz qnUtObMRgvDEO8AI6BJ8vgnqX7/Vt0H0f9qJ91U= X-Google-Smtp-Source: AOwi7QCyvSp2CdS1LFxze4fd5pOtpxO73MTwirmwD7qkRX0/JHYXaopWK5DJx0YCRQBMFbE/UfMvFWvgo5bMiIZqXmM= X-Received: by 10.233.237.5 with SMTP id c5mr542093qkg.309.1506635841462; Thu, 28 Sep 2017 14:57:21 -0700 (PDT) Original-Received: by 10.200.28.3 with HTTP; Thu, 28 Sep 2017 14:56:50 -0700 (PDT) X-Gmail-Original-Message-ID: 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:218873 Archived-At: --94eb2c080c6022e6b7055a46fe55 Content-Type: text/plain; charset="UTF-8" When mode-line line numbers are on by themselves, L appears. When mode-line column numbers are on by themselves, C appears. When both are on, (,) appears. The latter is inconsistent and always forces the user to remember which is the line and which is the column number. Fixing this is simple, simply remove the parentheses which are no longer needed and add the prefix character to each number for: L,C. This makes the display perfectly consistent, easier to read and does not take up any more character space. Patch to Emacs 25.3 included below. For Emacs 26, 2 lines have to change rather than one. It is an easy manual fix. Eli, would you change this for Emacs 26? It would be nice to have the consistency. *** bindings-orig.el 2017-09-28 17:48:59.000000000 -0400 --- bindings.el 2017-09-28 17:48:59.000000000 -0400 *************** *** 369,375 **** (line-number-mode ((column-number-mode (10 ,(propertize ! " (%l,%c)" 'local-map mode-line-column-line-number-mode-map 'mouse-face 'mode-line-highlight 'help-echo "Line number and Column number\n\ --- 369,375 ---- (line-number-mode ((column-number-mode (10 ,(propertize ! " L%l,C%c" 'local-map mode-line-column-line-number-mode-map 'mouse-face 'mode-line-highlight 'help-echo "Line number and Column number\n\ --94eb2c080c6022e6b7055a46fe55 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
= When mode-line line numbers are on by t= hemselves, L<line-num> appears.
When mode-line column numbers are o= n by themselves, C<col-num> appears.
When both are on, (<line-nu= m>,<col-num>) appears.

The latter is inconsistent and alw= ays forces the user to remember which is the line and which is the column n= umber.=C2=A0 Fixing this is simple, simply remove the parentheses which are= no longer needed and add the prefix character to each number for:=C2=A0 L&= lt;line-num>,C<col-num>.=C2=A0 This makes the display perfectly co= nsistent, easier to read and does not take up any more character space.
<= br>
Patch to Emacs 25.3 included below.=C2=A0 For Emacs 26, 2 lines have = to change rather than one.=C2=A0 It is an easy manual fix.

Eli, wo= uld you change this for Emacs 26?=C2=A0 It would be nice to have the consis= tency.

*** bindings-orig.el 2017-09-28 17:48:59.000000000 -0400
--- bindings.el 2017-09-28 17:48:59.000000000 -0400
***************
= *** 369,375 ****
=C2=A0 =C2=A0 =C2=A0 (line-number-mode
=C2=A0 =C2=A0 = =C2=A0 =C2=A0((column-number-mode
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(10 ,= (propertize
! =C2=A0 =C2=A0 =C2= =A0" (%l,%c)"
=C2=A0 = =C2=A0 =C2=A0 =C2=A0'local-map mode-line-column-line-number-mode-map
= =C2=A0 =C2=A0 =C2=A0 =C2=A0'mou= se-face 'mode-line-highlight
<= font face=3D"monospace, monospace">=C2=A0 = =C2=A0 =C2=A0 =C2=A0'help-echo "Line number and Column numb= er\n\
--- 369,375 ----
=C2=A0 =C2=A0 =C2=A0 (line-number-mode
=C2=A0 = =C2=A0 =C2=A0 =C2=A0((column-number-mode
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(10 ,(propertize
! =C2=A0 =C2= =A0 =C2=A0" L%l,C%c"
=C2=A0 =C2=A0 =C2=A0 =C2=A0'local-map mode-line-column-line-number-mode-m= ap
=C2=A0 =C2=A0 =C2=A0 =C2=A0= 9;mouse-face 'mode-line-highlight
=C2=A0 =C2=A0 =C2=A0 =C2=A0'help-echo "Line number and Column= number\n\

<= /div>
--94eb2c080c6022e6b7055a46fe55--