GNU bug report logs - #28648
Make mode-line number display consistent when both line and col numbers are shown.

Previous Next

Package: emacs;

Reported by: rswgnu <at> gmail.com

Date: Fri, 29 Sep 2017 16:01:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28648 in the body.
You can then email your comments to 28648 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 16:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to rswgnu <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 29 Sep 2017 16:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 11:59:35 -0400
[Message part 1 (text/plain, inline)]
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.

Based on some discussion on the emacs-devel list here:

https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00976.html
​​

this new patch solves both the consistency problem and the need for easy
alteration of the available line and column formats.  It extracts the line
and col format strings into a new variable so they can be easily changed.
Any change to that variable is immediately reflected in the modeline.

​​
Patch to
​​
Emacs 25.3 included below.  For Emacs 26,
​I believe there is one additional​
​​
l
​​
i
​​
n
​​
e
​​ that will need updating.  It is an easy manual addition.

​​
Eli, woul
​​
d you
​consider this ​
​change
f​
or Emacs 26?  It would be nice to have the consisten
​​
cy
​ and for other users to benefit​
.
​​
​

​​
*** bindings-orig.el 2017-09-29 11:55:31.000000000 -0400
--- bindings.el 2017-09-29 11:55:31.000000000 -0400
***************
*** 350,355 ****
--- 350,363 ----
      map) "\
  Keymap to display on column and line numbers.")

+ (defvar mode-line-column-line-number-formats
+   '((line-and-column . " L%l,C%c")
+     (line            . " L%l")
+     (column          . " C%c"))
+   "Alist of (symbol . format-string) pairs for mode-line numbering
display.
+ SYMBOL may be one of: line-and-column, line or column.
+ FORMAT-STRING may contain %l for the line number and %c for the column
number.")
+
  (defvar mode-line-position
    `((-3 ,(propertize
    "%p"
***************
*** 368,392 ****
  mouse-1: Display Line and Column Mode Menu")))
      (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\
! mouse-1: Display Line and Column Mode Menu"))
!        (6 ,(propertize
!     " L%l"
!     'local-map mode-line-column-line-number-mode-map
!     'mouse-face 'mode-line-highlight
!     'help-echo "Line Number\n\
! mouse-1: Display Line and Column Mode Menu"))))
       ((column-number-mode
!        (5 ,(propertize
!     " C%c"
!     'local-map mode-line-column-line-number-mode-map
!     'mouse-face 'mode-line-highlight
!     'help-echo "Column number\n\
! mouse-1: Display Line and Column Mode Menu"))))))
    "Mode line construct for displaying the position in the buffer.
  Normally displays the buffer percentage and, optionally, the
  buffer size, the line number and the column number.")
--- 376,400 ----
  mouse-1: Display Line and Column Mode Menu")))
      (line-number-mode
       ((column-number-mode
!        (10 (:eval (propertize
!    (or (cdr (assq 'line-and-column mode-line-column-line-number-formats))
" ")
!    'local-map mode-line-column-line-number-mode-map
!    'mouse-face 'mode-line-highlight
!    'help-echo "Line number and Column number\n\
! mouse-1: Display Line and Column Mode Menu")))
!        (6 (:eval (propertize
!   (or (cdr (assq 'line mode-line-column-line-number-formats)) " ")
!   'local-map mode-line-column-line-number-mode-map
!   'mouse-face 'mode-line-highlight
!   'help-echo "Line Number\n\
! mouse-1: Display Line and Column Mode Menu")))))
       ((column-number-mode
!        (5 (:eval (propertize
!   (or (cdr (assq 'column mode-line-column-line-number-formats)) " ")
!   'local-map mode-line-column-line-number-mode-map
!   'mouse-face 'mode-line-highlight
!   'help-echo "Column number\n\
! mouse-1: Display Line and Column Mode Menu")))))))
    "Mode line construct for displaying the position in the buffer.
  Normally displays the buffer percentage and, optionally, the
  buffer size, the line number and the column number.")
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 17:46:02 GMT) Full text and rfc822 format available.

Message #8 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Richard Stallman <rms <at> gnu.org>, 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 13:45:01 -0400
[Message part 1 (text/plain, inline)]
On Fri, Sep 29, 2017 at 1:06 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Robert Weiner <rsw <at> gnu.org>
> > Date: Thu, 28 Sep 2017 17:56:50 -0400
> >
> > 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.
>
> We had "Ln Cn" kind of display in Emacs 21 and before, and we changed
> that to the current display in Emacs 22.1 (the change itself is from
> Aug 2002).


​Was there any particular rationale for this?

I offered my rationale for this change above; can't we debate the merits
rather than that we changed it long ago?

  Does it really make sense to go back after 15 years?
>
> If you personally dislike the default display, you can always
> customize mode-line-format in your sessions, can't you?
>

​As I noted, this is way too hard with the current code.  My patch makes
such personal changes easy, so in the worst case, you could apply it but
leave the display format strings the same.  I already have this installed
for my use.  The issue is making Emacs do something better and easier to
understand for a broad array of users.  Maybe you could just ask people to
chime in with which format they prefer: (<num>,<num>) or L<num>,C<num> or
even (L<num>,C<num>).


> > Eli, would you change this for Emacs 26? It would be nice to have the
> consistency.
>
> Well, we used to like the current "inconsistency" better.
>

​I assume that is in jest.  If not, please explain.

Bob
​
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 18:19:03 GMT) Full text and rfc822 format available.

Message #11 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>, Robert Weiner <rswgnu <at> gmail.com>
Cc: 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 14:17:54 -0400
[Message part 1 (text/plain, inline)]
On Fri, Sep 29, 2017 at 1:49 PM, John Wiegley <johnw <at> gnu.org> wrote:

> >>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:
>
> But you're right, the mode line can always be customized, so I'm not
> feeling
> too strongly about this.
>

​Customizing mode-line-format won't help as the string to be modified is
embedded in the sub-variable, mode-line-position, which is a standard
variable not a customizable option.  So doesn't that mean there is no way
for a non-programming user to change the line-col display format and have
that change persist across Emacs releases without replicating the whole
definition of mode-line-position?

Bob
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 18:22:01 GMT) Full text and rfc822 format available.

Message #14 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rswgnu <at> gmail.com
Cc: rms <at> gnu.org, 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 21:20:46 +0300
> From: Robert Weiner <rsw <at> gnu.org>
> Date: Fri, 29 Sep 2017 13:45:01 -0400
> Cc: 28648 <at> debbugs.gnu.org, Richard Stallman <rms <at> gnu.org>
> 
>  We had "Ln Cn" kind of display in Emacs 21 and before, and we changed
>  that to the current display in Emacs 22.1 (the change itself is from
>  Aug 2002).
> 
> ​Was there any particular rationale for this?

Yes: the "Ln Cn" display was deemed "quite annoying to look at".
Sounds familiar? ;-)

You can read the entire thread here:

  http://lists.gnu.org/archive/html/emacs-devel/2002-08/msg00451.html

(most of it is not about this particular change).

> I offered my rationale for this change above; can't we debate the merits rather than that we changed it long
> ago?

It just sounds strange to me to go back on a change, when no one AFAIR
complained about that change.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 18:22:02 GMT) Full text and rfc822 format available.

Message #17 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Colin Baxter <m43cap <at> yandex.com>, Jose Arroyo <jose.m.arroyo.se <at> gmail.com>,
 John Wiegley <johnw <at> gnu.org>, 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 14:20:37 -0400
[Message part 1 (text/plain, inline)]
On Fri, Sep 29, 2017 at 2:16 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: "John Wiegley" <johnw <at> gnu.org>
> > Date: Fri, 29 Sep 2017 10:35:14 -0700
> > Cc: Colin Baxter <m43cap <at> yandex.com>, Jose Arroyo <
> jose.m.arroyo.se <at> gmail.com>,
> >       rswgnu <at> gmail.com, emacs-devel <emacs-devel <at> gnu.org>
> >
> > It think the new default should be:
> >
> >     Lnn
> >     Cnn
> >     Lnn Cnn
>
> That's what we had before Emacs 22.1.
>

​I am fine with that, though having the more modular code in the patch I
submitted would also allow users to change the format easily as desired.

Bob
​
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 18:50:02 GMT) Full text and rfc822 format available.

Message #20 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Richard Stallman <rms <at> gnu.org>, 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 14:48:32 -0400
[Message part 1 (text/plain, inline)]
On Fri, Sep 29, 2017 at 2:20 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Robert Weiner <rsw <at> gnu.org>
> > Date: Fri, 29 Sep 2017 13:45:01 -0400
> > Cc: 28648 <at> debbugs.gnu.org, Richard Stallman <rms <at> gnu.org>
> >
> >  We had "Ln Cn" kind of display in Emacs 21 and before, and we changed
> >  that to the current display in Emacs 22.1 (the change itself is from
> >  Aug 2002).
> >
> > ​Was there any particular rationale for this?
>
> Yes: the "Ln Cn" display was deemed "quite annoying to look at".
> Sounds familiar? ;-)
>

​One person said that and there were differing opinions.  RMS agreed to the
change but it is unclear which parts he really wanted.  Richard, did you
really want the display of L and C removed when both are shown or was there
some other aspect to this change that you wanted?  The better question is
what do you think now?
​​​

> ​​
>
> ​​
> You can read the entire thread here:
> ​​
>
> ​​
>   http://lists.gnu.org/archive/html/emacs-devel/2002-08/msg00451.html


​Thanks for the pointer.  The thread does not suggest that the change was
based on any universal or even consensus opinion, thus it should be open to
debate again.

Bob
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 19:16:01 GMT) Full text and rfc822 format available.

Message #23 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rswgnu <at> gmail.com
Cc: rswgnu <at> gmail.com, 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 22:15:27 +0300
> From: Robert Weiner <rsw <at> gnu.org>
> Date: Fri, 29 Sep 2017 14:17:54 -0400
> Cc: 28648 <at> debbugs.gnu.org
> 
>  But you're right, the mode line can always be customized, so I'm not feeling
>  too strongly about this.
> 
> ​Customizing mode-line-format won't help as the string to be modified is embedded in the sub-variable,
> mode-line-position, which is a standard variable not a customizable option. So doesn't that mean there is no
> way for a non-programming user to change the line-col display format and have that change persist across
> Emacs releases without replicating the whole definition of mode-line-position?

If you are asking for an optional feature that would display these
indicators as we did 15 years ago, I'm okay with adding it.  (We
already have quite a few optional variations on similar themes, but
one more cannot do too much harm, I guess.)

My interpretation of what you said originally was that you want to
unconditionally revert to pre-22 behavior, which is quite a different
request.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 19:25:02 GMT) Full text and rfc822 format available.

Message #26 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 15:23:30 -0400
[Message part 1 (text/plain, inline)]
On Fri, Sep 29, 2017 at 3:15 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

>
> If you are asking for an optional feature that would display these
> indicators as we did 15 years ago, I'm okay with adding it.  (We
> already have quite a few optional variations on similar themes, but
> one more cannot do too much harm, I guess.)
>

​Can you explain how that would work?  How would you modify the line and
col display format?  Do you mean applying my patch but leaving the default
format strings as they are now?
​

>
> My interpretation of what you said originally was that you want to
> unconditionally revert to pre-22 behavior, which is quite a different
> request.
>

​We have two separate issues here:

1. The default line and col display format: I was suggesting the change for
consistency sake.​  If it could be made an easy-to-trigger option on the
popup menu that controls this display, I could support that.

2. The ability to easily change the line and col display format strings: My
patch solves that issue.

Bob
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 20:10:01 GMT) Full text and rfc822 format available.

Message #29 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rswgnu <at> gmail.com
Cc: 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 23:08:59 +0300
> From: Robert Weiner <rsw <at> gnu.org>
> Date: Fri, 29 Sep 2017 15:23:30 -0400
> Cc: 28648 <at> debbugs.gnu.org
> 
>  If you are asking for an optional feature that would display these
>  indicators as we did 15 years ago, I'm okay with adding it. (We
>  already have quite a few optional variations on similar themes, but
>  one more cannot do too much harm, I guess.)
> 
> ​Can you explain how that would work? How would you modify the line and col display format?

By providing a defcustom which will arrange for mode-line-format to
have the right stuff, I suppose.

> ​We have two separate issues here:
> 
> 1. The default line and col display format: I was suggesting the change for consistency sake.​ If it could be
> made an easy-to-trigger option on the popup menu that controls this display, I could support that.
> 
> 2. The ability to easily change the line and col display format strings: My patch solves that issue.

Your patch makes the change unconditional for everyone.  I don't think
we should do that, especially since we once went in the opposite
direction.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 20:17:01 GMT) Full text and rfc822 format available.

Message #32 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 28648 <at> debbugs.gnu.org
Subject: Re: Make mode-line number display consistent when both line and col
 numbers are shown.
Date: Fri, 29 Sep 2017 16:15:43 -0400
[Message part 1 (text/plain, inline)]
On Fri, Sep 29, 2017 at 4:08 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Robert Weiner <rsw <at> gnu.org>
> > Date: Fri, 29 Sep 2017 15:23:30 -0400
> > Cc: 28648 <at> debbugs.gnu.org
> >
> >  If you are asking for an optional feature that would display these
> >  indicators as we did 15 years ago, I'm okay with adding it. (We
> >  already have quite a few optional variations on similar themes, but
> >  one more cannot do too much harm, I guess.)
> >
> > ​Can you explain how that would work? How would you modify the line and
> col display format?
>
> By providing a defcustom which will arrange for mode-line-format to
> have the right stuff, I suppose.
>

​Just change the patch to use a defcustom instead of the defvar for the
line and col format strings.
​

>
> > ​We have two separate issues here:
> >
> > 1. The default line and col display format: I was suggesting the change
> for consistency sake.​ If it could be
> > made an easy-to-trigger option on the popup menu that controls this
> display, I could support that.
> >
> > 2. The ability to easily change the line and col display format strings:
> My patch solves that issue.
>
> Your patch makes the change unconditional for everyone.  I don't think
> we should do that, especially since we once went in the opposite
> direction.
>

​Ok, then just modify the one line-and-col string to be as it presently is
in Emacs (that's the only one that was modified) and users will not see a
change unless they customize the format strings.

Bob
​
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Fri, 29 Sep 2017 21:56:02 GMT) Full text and rfc822 format available.

Message #35 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: rswgnu <at> gmail.com
Cc: eliz <at> gnu.org, 28648 <at> debbugs.gnu.org
Subject: Re: bug#28648: Make mode-line number display consistent when both line
 and col numbers are shown.
Date: Fri, 29 Sep 2017 17:55:42 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > ​One person said that and there were differing opinions.  RMS agreed to the
  > change but it is unclear which parts he really wanted.  Richard, did you
  > really want the display of L and C removed when both are shown or was there
  > some other aspect to this change that you wanted?  The better question is
  > what do you think now?

I don't have any opinion now about this question.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Sat, 30 Sep 2017 03:04:02 GMT) Full text and rfc822 format available.

Message #38 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, rswgnu <at> gmail.com
Cc: 28648 <at> debbugs.gnu.org
Subject: RE: bug#28648: Make mode-line number display consistent when both
 line and col numbers are shown.
Date: Fri, 29 Sep 2017 20:03:23 -0700 (PDT)
Apologies (again) for not reading the thread.

FYI, my library `modeline-posn.el' modifies the default value of
`mode-line-position' to allow for some features and customizing.

(I'm guessing that whatever changes you're making to the vanilla
value will complicate things for me a bit, but that's life.)

You _might_ want to take a look at `modeline-posn.el', to see
if it or parts of it might help.

It has, for example, option `modelinepos-style', which lets
you show info about the size of the active region in the
mode-line-position part of the mode-line.  You can choose
any of these:

 * "_ ch, _ l" (or "_ rows, _ cols", if a rectangle is selected)

 * "_ chars"

 * "_ bytes"

 * the result of a custom format string and any args it expects

(There are some other features too, such as using a different
face on the region info when the current command is acting on
the active region.  For example, a command such as `query-replace'
acts differently when the region is active - when it is, the
face changes to avert you to this fact.)

The code is here, if you're interested:
https://www.emacswiki.org/emacs/download/modeline-posn.el

A description is here:
https://www.emacswiki.org/emacs/ModeLinePosition




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Thu, 19 Oct 2017 20:34:01 GMT) Full text and rfc822 format available.

Message #41 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: 28648 <at> debbugs.gnu.org
Subject: Re: bug#28648: Acknowledgement (Make mode-line number display
 consistent when both line and col numbers are shown.)
Date: Thu, 19 Oct 2017 16:32:58 -0400
[Message part 1 (text/plain, inline)]
Attached is my full solution for this problem.  Anyone is welcome to
integrate any parts useful directly into Emacs.
For now, it works as a loadable Lisp library.

Bob
[Message part 2 (text/html, inline)]
[rsw-linecol.el (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Tue, 15 Sep 2020 15:10:01 GMT) Full text and rfc822 format available.

Message #44 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Weiner <rsw <at> gnu.org>
Cc: rswgnu <at> gmail.com, 28648 <at> debbugs.gnu.org
Subject: Re: bug#28648: Acknowledgement (Make mode-line number display
 consistent when both line and col numbers are shown.)
Date: Tue, 15 Sep 2020 17:09:11 +0200
Robert Weiner <rsw <at> gnu.org> writes:

> Attached is my full solution for this problem.  Anyone is welcome to integrate any
> parts useful directly into Emacs.
> For now, it works as a loadable Lisp library.
>
> Bob
> ;;; rsw-linecol.el --- User-editable mode-line column and line number display formats
> ;;
> ;; Keywords:     convenience, tools

[...]

> (defvar mode-line-column-line-number-formats
>   '((line-and-column0 . " L%l,C%c")
>     (line-and-column1 . " L%l,C%C")
>     (line             . " L%l")
>     (column0          . " C%c")
>     (column1          . " C%C"))

This was a lot of code, and I think a greater degree of customisability
than is warranted.  I've taken some of these ideas and cooked them down
into two variables: mode-line-position-line-format and
mode-line-position-column-format -- and pushed to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 15 Sep 2020 15:10:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 28648 <at> debbugs.gnu.org and rswgnu <at> gmail.com Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 15 Sep 2020 15:10:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28648; Package emacs. (Tue, 15 Sep 2020 17:28:02 GMT) Full text and rfc822 format available.

Message #51 received at 28648 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rswgnu <at> gmail.com>
To: 28648 <at> debbugs.gnu.org
Subject: Re: bug#28648 acknowledged by developer (control message for bug
 #28648)
Date: Tue, 15 Sep 2020 13:27:08 -0400
Great, thanks.

-- Bob

> On Sep 15, 2020, at 11:10 AM, GNU bug Tracking System <help-debbugs <at> gnu.org> wrote:
> 
> This is an automatic notification regarding your bug report
> #28648: Make mode-line number display consistent when both line and col numbers are shown.,
> which was filed against the emacs package.
> 
> Thank you for your report, which has now been closed.
> You can view the full report at
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28648
> 
> If you require further information, please followup to 28648 <at> debbugs.gnu.org.
> 
> debbugs.gnu.org maintainers
> (administrator, GNU bugs database)
> 




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Oct 2020 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 188 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.