emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Native display of line numbers


From: Scott Jaderholm
Subject: Re: Native display of line numbers
Date: Sun, 18 Jun 2017 22:49:48 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Mon, Jun 19 2017,Eli Zaretskii wrote:

>> From: Scott Jaderholm <address@hidden> Cc: address@hidden
>> Date: Sun, 18 Jun 2017 15:20:04 -0700
>> 
>> It would be nice to be able to display both absolute and relative line
>> numbers at the same time, with each having their own face.
>
> That sounds strange to me. What is the use case for that?

It's not that there's a unique use case when they're used together, but
that there are various independent use cases for absolute line numbers
and various independent use cases for relative line numbers, and a user
might want some from both sets at any time.

For example, relative line numbers are useful for counting items in a
list and prefixing movement/deletion/etc commands. Absolute line numbers
are useful for tracking down errors, context in the file, or
communicating a line. A user might want all of these things.

> Would a key binding that would switch between absolute and relative
> numbers be good enough for such a use case?

I think it would be unfortunate if that were required. For most of the
use cases for both modes it's nice to be able to see the numbers at a
glance without having to invoke a command first. If users were happy
pressing a key before seeing line numbers, then the performance when
scrolling wouldn't matter because the old modes could just be used on
demand.

Another way to think about it is it's nice to have more than one item in
a mode-line. It would be unfortunate if mode-lines could only display
buffer names and we had to press a key binding everytime we wanted to see
something else there.

Scott



reply via email to

[Prev in Thread] Current Thread [Next in Thread]