From: Juri Linkov <juri@linkov.net>
To: "João Paulo Labegalini de Carvalho" <jaopaulolc@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Display window line numbers
Date: Tue, 06 Dec 2022 20:43:30 +0200 [thread overview]
Message-ID: <86mt8074wt.fsf@mail.linkov.net> (raw)
In-Reply-To: <CAGjvy297GM4t_5cOHJ3n1d4yTEX8DMV=6a6F8P8NAb4wu8A6Fw@mail.gmail.com> ("João Paulo Labegalini de Carvalho"'s message of "Tue, 6 Dec 2022 11:04:02 -0700")
> You could set `display-line-numbers' to 'absolute and run code below every
> time the window is scrolled up/down (e.g. with a hook):
>
> (save-excursion
> (move-to-window-line 0)
> (setq display-line-numbers-offset
> (* -1
> (line-number-at-pos))))
Thanks, adding this to `window-scroll-functions' displays correct
line numbers. But only when the same buffer is not displayed
in two windows.
next prev parent reply other threads:[~2022-12-06 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 17:10 Display window line numbers Juri Linkov
2022-12-06 18:04 ` João Paulo Labegalini de Carvalho
2022-12-06 18:43 ` Juri Linkov [this message]
2022-12-06 18:14 ` Eli Zaretskii
2022-12-06 18:44 ` Juri Linkov
2022-12-06 18:53 ` Eli Zaretskii
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=86mt8074wt.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=emacs-devel@gnu.org \
--cc=jaopaulolc@gmail.com \
/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.