From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the line number from the minibuffer Date: Thu, 29 Oct 2020 11:19:11 +0200 Message-ID: <878sbps834.fsf@mail.linkov.net> References: <877dspmzo3.fsf@gnus.org> <83zh5l1uqw.fsf@gnu.org> <87wo0osspd.fsf@gnus.org> <87lfh3dtoj.fsf@mail.linkov.net> <878sd1j2rv.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33023"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 5042@debbugs.gnu.org, 9917@debbugs.gnu.org, monnier@iro.umontreal.ca, dmoncayo@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 29 10:21:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kY47K-0008U2-N7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 10:21:10 +0100 Original-Received: from localhost ([::1]:46884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kY47J-0003OA-OR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 05:21:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kY47C-0003N9-HJ for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 05:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kY47C-0001uc-7z for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 05:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kY47C-0008Fb-4H for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 05:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2020 09:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9917 X-GNU-PR-Package: emacs Original-Received: via spool by 9917-submit@debbugs.gnu.org id=B9917.160396322931637 (code B ref 9917); Thu, 29 Oct 2020 09:21:02 +0000 Original-Received: (at 9917) by debbugs.gnu.org; 29 Oct 2020 09:20:29 +0000 Original-Received: from localhost ([127.0.0.1]:51860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kY46e-0008E8-Qz for submit@debbugs.gnu.org; Thu, 29 Oct 2020 05:20:29 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:56071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kY46c-0008Dd-QJ; Thu, 29 Oct 2020 05:20:27 -0400 Original-Received: from mail.gandi.net (m91-129-102-160.cust.tele2.ee [91.129.102.160]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 8B0D2200004; Thu, 29 Oct 2020 09:20:18 +0000 (UTC) In-Reply-To: <878sd1j2rv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 22 Sep 2020 16:37:40 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191946 Archived-At: >>> So a new command and keystroke seems warranted. How about... >>> `M-g M-v'? (The mnemonic is "goto visual line".) >> >> Or to add a new key to narrow-map 'C-x n' where a new key could be: >> >> C-x n g go to narrowed line > > Perhaps both? The keystroke makes sense in both contexts -- as a > variation on `M-g M-g', and in the group of narrowing keystroke. I've added a more localized key binding 'C-x n g', but still not sure about the global 'M-g' key bindings. Here are some possible variants: 1. Bind 'M-g v' to goto-line-relative, while leaving 'M-g g' bound to goto-line that currently uses absolute line numbers (btw, this fact should be mentioned in its docstring); 2. Re-bind 'M-g g' to goto-line-relative as many asked to do with the reasoning that 'M-g g' should use by default the same numbering scheme as is displayed by display-line-numbers-mode; 3. Leave the existing 'M-g g' bound to goto-line, but allow changing the numbering scheme using a prefix arg and a user option. Or another idea: maybe it should depend on whether display-line-numbers-mode is enabled or not? When display-line-numbers-mode is enabled, then use relative line numbers that are displayed on the left side (WYSIWYG).