all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joseph Garvin <k04jg02@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Native display of line numbers: visual line-counting
Date: Sat, 24 Jun 2017 15:13:32 -0500	[thread overview]
Message-ID: <CAH=MJ4aZ3yYCAcHBvAxLTz5VDUv8YaaieZHB2qVojmH18em0_g@mail.gmail.com> (raw)
In-Reply-To: <83mv8xtclh.fsf@gnu.org>

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

On Jun 24, 2017 2:22 PM, "Eli Zaretskii" <eliz@gnu.org> wrote:

> From: Joseph Garvin <k04jg02@gmail.com>
> Date: Sat, 24 Jun 2017 14:03:27 -0500
> Cc: emacs-devel@gnu.org
>
> For my own use of relative line numbers (speech recognition controlled
programming) what's important is
> that the line numbering matches the number of times I'd press the up/down
arrow keys or C-p/C-n to move
> my cursor to the labeled line. The whole reason for me to use the feature
is to make it easier by eyeballing to
> predict where the cursor will land after I say "up 4", "down 7", etc. So
I don't care at all about the numbering
> matching physical lines in the file.

What about lines where cursor cannot enter?  Are you saying you don't
want to count them?


I was just trying to illustrate my use case, I didn't mean to imply
anything about lines you can't enter. I typically am editing source files
where all lines can be entered. But now that you mention it, if for example
there was an overlay making it appear as if more lines were in the buffer
than there actually were, then yes ideally those would not count. That's
not something I run into very often though. A solution that didn't handle
this edge case but otherwise had relative visual line numbers would still
be a big improvement.


Also, you seem to be saying that lines that span multiple screen lines
should be counted that many times.  If so, the numbers are not really
"line numbers" anymore, but something else.


From a text editor programmer's perspective line number may be defined by
something like, "number of preceding newline characters" but I think most
users think in terms of the lines of text as they are rendered on the
display. Most non-emacs editors and IDEs nowadays use wrapping that acts
like visual line mode by default. I would call them "visual line numbers."

Moreover, these lines
cannot be communicated to anyone else, as their window geometry could
be different.


Relative line numbers already can't be communicated anyway, since the other
person would have to have their cursor on the same line. But I don't think
users of relative lines are using it for communicating with other people.
They're using it so they can more easily plan a series of keystrokes or
voice commands that they're going to issue themselves.

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

  reply	other threads:[~2017-06-24 20:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-24 18:15 Native display of line numbers: visual line-counting Eli Zaretskii
2017-06-24 19:03 ` Joseph Garvin
2017-06-24 19:22   ` Eli Zaretskii
2017-06-24 20:13     ` Joseph Garvin [this message]
2017-06-24 20:42 ` James Nguyen
2017-06-25 19:16 ` Stefan Monnier
2017-06-25 19:31   ` Joseph Garvin
2017-06-25 20:20     ` Stefan Monnier
2017-06-26  2:37       ` Eli Zaretskii
2017-06-26  2:35     ` Eli Zaretskii
     [not found] ` <CAEwkUWN-W94hfP1N=QR2A91Ae_bVBbX1xZpzPPuRQ8siMir5oA@mail.gmail.com>
2017-06-27 15:00   ` Eli Zaretskii
2017-06-27 16:26     ` Filipe Silva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH=MJ4aZ3yYCAcHBvAxLTz5VDUv8YaaieZHB2qVojmH18em0_g@mail.gmail.com' \
    --to=k04jg02@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.