unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Make mode-line number display consistent when both line and col numbers are shown.
@ 2017-09-28 21:56 Robert Weiner
  2017-09-29  7:02 ` Colin Baxter
  2017-09-29 17:06 ` Eli Zaretskii
  0 siblings, 2 replies; 17+ messages in thread
From: Robert Weiner @ 2017-09-28 21:56 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

When mode-line line numbers are on by themselves, L<line-num> appears.
When mode-line column numbers are on by themselves, C<col-num> appears.
When both are on, (<line-num>,<col-num>) 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<line-num>,C<col-num>.  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\

[-- Attachment #2: Type: text/html, Size: 4205 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-09-29 19:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28 21:56 Make mode-line number display consistent when both line and col numbers are shown Robert Weiner
2017-09-29  7:02 ` Colin Baxter
2017-09-29  8:25   ` Jose Arroyo
2017-09-29  9:22     ` Colin Baxter
2017-09-29 13:26       ` Robert Weiner
2017-09-29 16:23         ` Robert Weiner
2017-09-29 17:35         ` John Wiegley
2017-09-29 18:16           ` Eli Zaretskii
2017-09-29 18:26             ` Richard Copley
2017-09-29 18:30               ` Kaushal Modi
2017-09-29 18:48                 ` Yuri Khan
2017-09-29 19:17                   ` Robert Weiner
2017-09-29 19:30                     ` Richard Copley
2017-09-29 19:31                   ` Stefan Monnier
2017-09-29 13:14     ` Robert Weiner
2017-09-29 17:06 ` Eli Zaretskii
2017-09-29 17:49   ` John Wiegley

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).