From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: 42839@debbugs.gnu.org
Subject: bug#42839: [PATCH] Support displaying line numbers in goto-line
Date: Thu, 13 Aug 2020 16:10:26 +0300 [thread overview]
Message-ID: <83mu2yn131.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkmkCryuZ6B0cgHEzX_V8mmad0gzBMQRR6dYU9958jVu9zg@mail.gmail.com> (message from Stefan Kangas on Wed, 12 Aug 2020 23:30:42 -0700)
> From: Stefan Kangas <stefan@marxist.se>
> Date: Wed, 12 Aug 2020 23:30:42 -0700
>
> + (let ((showing display-line-numbers))
> + (unwind-protect
> + (progn
> + (when (not showing)
> + (display-line-numbers-mode 1))
> + (list (read-number (format "Goto line%s: " buffer-prompt)
> + (list default (line-number-at-pos))
> + 'goto-line-history)
> + buffer))
> + (when (not showing)
> + (display-line-numbers-mode -1)))))))
The variable display-line-numbers is not a simple boolean, it can have
several values. I think you intended to show absolute line numbers in
this case, so just testing whether display-line-numbers is non-nil is
not enough. Similarly, restoring the original setting needs more than
just a call to display-line-numbers-mode.
And this needs a NEWS entry.
Other than that, if someone wants this optional feature, why not?
next prev parent reply other threads:[~2020-08-13 13:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 6:30 bug#42839: [PATCH] Support displaying line numbers in goto-line Stefan Kangas
2020-08-13 8:30 ` Robert Pluim
2020-08-13 8:58 ` Stefan Kangas
2020-08-13 9:16 ` Robert Pluim
2020-08-13 13:17 ` Eli Zaretskii
2020-08-13 13:24 ` Robert Pluim
2020-08-13 13:10 ` Eli Zaretskii [this message]
2020-08-13 14:30 ` Stefan Kangas
2020-10-09 21:22 ` Stefan Kangas
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mu2yn131.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=42839@debbugs.gnu.org \
--cc=stefan@marxist.se \
/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 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).