GNU bug report logs - #5042
23.1; linum-mode gives incorrect line numbers with narrowed buffers

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: mark.lillibridge@HIDDEN; merged with #9917, #16173; Forwarded to http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00143.html; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 31 Oct 2020 20:01:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 31 16:01:27 2020
Received: from localhost ([127.0.0.1]:34603 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYx43-0006E2-6v
	for submit <at> debbugs.gnu.org; Sat, 31 Oct 2020 16:01:27 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52628)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1kYx3y-00065t-EJ; Sat, 31 Oct 2020 16:01:25 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42825)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kYx3r-0005CW-8G; Sat, 31 Oct 2020 16:01:15 -0400
Received: from [176.228.60.248] (port=3177 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kYx3p-0002aY-VQ; Sat, 31 Oct 2020 16:01:14 -0400
Date: Sat, 31 Oct 2020 22:00:59 +0200
Message-Id: <83361ugo78.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <878sbmp612.fsf@HIDDEN> (message from Juri Linkov on
 Sat, 31 Oct 2020 21:28:41 +0200)
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN> <878sbps834.fsf@HIDDEN>
 <87tuucm4br.fsf@HIDDEN> <878sbmp612.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  5042 <at> debbugs.gnu.org,
>   9917 <at> debbugs.gnu.org,  monnier@HIDDEN,  dmoncayo@HIDDEN
> Date: Sat, 31 Oct 2020 21:28:41 +0200
> 
> What do you think about binding upper-case 'M-G G' to goto-line,

It's harder to type.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 31 Oct 2020 19:45:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 31 15:45:35 2020
Received: from localhost ([127.0.0.1]:34576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYwog-0004aI-SY
	for submit <at> debbugs.gnu.org; Sat, 31 Oct 2020 15:45:35 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:45327)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1kYwod-0004ZY-8W; Sat, 31 Oct 2020 15:45:31 -0400
X-Originating-IP: 91.129.102.160
Received: from mail.gandi.net (m91-129-102-160.cust.tele2.ee [91.129.102.160])
 (Authenticated sender: juri@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 091E51BF206;
 Sat, 31 Oct 2020 19:45:21 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
Organization: LINKOV.NET
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN> <878sbps834.fsf@HIDDEN>
 <87tuucm4br.fsf@HIDDEN>
Date: Sat, 31 Oct 2020 21:28:41 +0200
In-Reply-To: <87tuucm4br.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 30 Oct 2020 10:49:12 +0100")
Message-ID: <878sbmp612.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: Eli Zaretskii <eliz@HIDDEN>, dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> 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);
>
> This makes most sense to me -- sometimes you want to go relative (when
> you're working on stuff wrt. the buffer) and sometimes you want to go
> absolute (when you're looking at external data, like error reports and
> the like).
>
> So two commands (and keystrokes), and document the difference properly.

What do you think about binding upper-case 'M-G G' to goto-line,
where the big G has mnemonics of more global absolute line numbers,
and binding lower-case 'M-g g' to goto-line-relative where
the little g means more local relative addressing.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 30 Oct 2020 09:49:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 30 05:49:26 2020
Received: from localhost ([127.0.0.1]:56097 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYR2E-00048L-0K
	for submit <at> debbugs.gnu.org; Fri, 30 Oct 2020 05:49:26 -0400
Received: from quimby.gnus.org ([95.216.78.240]:35148)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1kYR2B-000482-Tu; Fri, 30 Oct 2020 05:49:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=AEJMT/8Uuj91GjZxJn2iorJ9ZzZtsB3EBtDLPG+cnYc=; b=W3BIhLF+JxBq/LfXjh0QiLwg3m
 pl+hbsX7eA9xiyMC89k2grxZ3Sh1Afbhogr3a5lwxaYwnHZ4zktkc3FhTA0Tf/HgOypyBlwKCs8wt
 p0qqXmrEyeEsCcypJmCtQ6vXY1ZvYgfkSVg3lPJF0CMyzK/Fc3cUH60iztGbWqKblNVk=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kYR21-00056y-Lr; Fri, 30 Oct 2020 10:49:16 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN> <878sbps834.fsf@HIDDEN>
X-Now-Playing: Various's _I Wanna Be Kate: The Songs of Kate Bush_:
 "Suspended In Gaffa (2020 Remaster)"
Date: Fri, 30 Oct 2020 10:49:12 +0100
In-Reply-To: <878sbps834.fsf@HIDDEN> (Juri Linkov's message of "Thu, 
 29 Oct 2020 11:19:11 +0200")
Message-ID: <87tuucm4br.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Juri Linkov <juri@HIDDEN> writes: > 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 leavi [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: Eli Zaretskii <eliz@HIDDEN>, dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> 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);

This makes most sense to me -- sometimes you want to go relative (when
you're working on stuff wrt. the buffer) and sometimes you want to go
absolute (when you're looking at external data, like error reports and
the like).

So two commands (and keystrokes), and document the difference properly.

> 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).

I'm not opposed to this, but I wonder whether it'd be used much (if we
have two keystrokes, which I think we should have anyway).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 30 Oct 2020 09:44:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 30 05:44:39 2020
Received: from localhost ([127.0.0.1]:56090 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYQxb-00040V-4a
	for submit <at> debbugs.gnu.org; Fri, 30 Oct 2020 05:44:39 -0400
Received: from quimby.gnus.org ([95.216.78.240]:35118)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1kYQxY-00040B-UQ; Fri, 30 Oct 2020 05:44:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=jYGn8OdLxxHXY0HfXA5JTFhbfPnELFDGQ0Ts4pn8NJw=; b=VaugRTUaqEaKXvdgl9U1FiTo6d
 rTapgzrIvn0lx8cyzWTuXnECd5hduaR0wQGiYUVnDJ3lqWl+PUAcFo4B0q1A20HoVcuq1Bm2WDC8D
 E03/E0s43nSA0PnxPXTZNgLqrYU/zirM9bkxjqY67sQkCUiF55Mh6Y53/vPQiGnNgIQc=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kYQxN-00053A-UA; Fri, 30 Oct 2020 10:44:28 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <87zh478ovp.fsf@HIDDEN> <87pn52vfyj.fsf@HIDDEN>
 <0e43a8ea-266e-e324-cd55-cfe07dd28522@HIDDEN>
X-Now-Playing: Various's _I Wanna Be Kate: The Songs of Kate Bush_: "Home
 For Christmas (2020 Remaster)"
Date: Fri, 30 Oct 2020 10:44:24 +0100
In-Reply-To: <0e43a8ea-266e-e324-cd55-cfe07dd28522@HIDDEN> (Dmitry Gutov's
 message of "Wed, 28 Oct 2020 13:58:03 +0200")
Message-ID: <87y2jom4jr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Dmitry Gutov <dgutov@HIDDEN> writes: > In case I don't
 respond in similar circumstances in the future, may I > ask for a personal
 email? One without 'debbugs.gnu.org' in the > From/To/Cc. OK, will try to
 remember. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
 dmoncayo@HIDDEN, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dmitry Gutov <dgutov@HIDDEN> writes:

> In case I don't respond in similar circumstances in the future, may I
> ask for a personal email? One without 'debbugs.gnu.org' in the
> From/To/Cc.

OK, will try to remember.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 30 Oct 2020 08:20:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 30 04:20:13 2020
Received: from localhost ([127.0.0.1]:55984 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYPds-0001t6-OC
	for submit <at> debbugs.gnu.org; Fri, 30 Oct 2020 04:20:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45844)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1kYPdq-0001sk-QT; Fri, 30 Oct 2020 04:20:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56594)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kYPdk-00056H-M9; Fri, 30 Oct 2020 04:20:04 -0400
Received: from [176.228.60.248] (port=2358 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kYPdj-0003Yp-Jv; Fri, 30 Oct 2020 04:20:04 -0400
Date: Fri, 30 Oct 2020 10:19:46 +0200
Message-Id: <83blgkazx9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87r1pgch84.fsf@HIDDEN> (message from Juri Linkov on
 Fri, 30 Oct 2020 09:27:43 +0200)
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN> <878sbps834.fsf@HIDDEN>
 <83sg9xaysh.fsf@HIDDEN> <87r1pgch84.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: larsi@HIDDEN,  5042 <at> debbugs.gnu.org,  9917 <at> debbugs.gnu.org,
>   monnier@HIDDEN,  dmoncayo@HIDDEN
> Date: Fri, 30 Oct 2020 09:27:43 +0200
> 
> >> 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.
> >
> > I like this the best.
> 
> If making the current goto-line 'M-g g' more DWIM is not easy to do,
> maybe really a user option could help with such choices:
> 
> - always use absolute line numbers;
> - always use relative line numbers;
> - follow the value of display-line-numbers-widen;
> ...

That's also a possibility, but I think "M-1 M-g g" would still be
useful, even with these options, because sometimes the need in
narrow-relative line numbers is a one-time thing.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 30 Oct 2020 07:28:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 30 03:28:20 2020
Received: from localhost ([127.0.0.1]:55928 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYOpg-0006sd-77
	for submit <at> debbugs.gnu.org; Fri, 30 Oct 2020 03:28:20 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:33459)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1kYOpc-0006s8-Uv; Fri, 30 Oct 2020 03:28:17 -0400
X-Originating-IP: 91.129.102.160
Received: from mail.gandi.net (m91-129-102-160.cust.tele2.ee [91.129.102.160])
 (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 658D640002;
 Fri, 30 Oct 2020 07:28:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
Organization: LINKOV.NET
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN> <878sbps834.fsf@HIDDEN>
 <83sg9xaysh.fsf@HIDDEN>
Date: Fri, 30 Oct 2020 09:27:43 +0200
In-Reply-To: <83sg9xaysh.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 29 Oct
 2020 16:31:58 +0200")
Message-ID: <87r1pgch84.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> 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;
>
> Two comments:
>
>  1) display-line-numbers-mode by default behaves the same as
>     line-number-mode
>  2) display-line-numbers-mode has the display-line-numbers-widen
>     option which disregards narrowing, so if you want to follow
>     display-line-numbers-mode, you will need to heed that option as
>     well
>
>> 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.
>
> I like this the best.

If making the current goto-line 'M-g g' more DWIM is not easy to do,
maybe really a user option could help with such choices:

- always use absolute line numbers;
- always use relative line numbers;
- follow the value of display-line-numbers-widen;
...

Also more explicit keys are needed, e.g.:

M-g l a   - with mnemonics: goto line absolute
M-g l r   - with mnemonics: goto line relative




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 29 Oct 2020 16:44:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 29 12:44:42 2020
Received: from localhost ([127.0.0.1]:54790 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYB2Y-0001CP-2N
	for submit <at> debbugs.gnu.org; Thu, 29 Oct 2020 12:44:42 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:37738)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>)
 id 1kYB2W-0001CA-DU; Thu, 29 Oct 2020 12:44:41 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09TGcuSU014206;
 Thu, 29 Oct 2020 16:44:34 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=pPzWn+T9EqJctoOiEh/p/5jR+G8S8K2jGndrSfETOG0=;
 b=v2IKAhisco4deEEa4h26HD+O2ek86p6SV30bLpzBPmRfEsdO9nD/mpRG7zB4bWaP+Swp
 JuYXfdhm9qMvbbJjqonsSw+wrmoAWYYKUeM5bUkKKXOHops9PBAJ2fPJFZ4vGW2rFVEw
 00n/BpnNDIbRDmJntFgnOzEFzndkwTknXaNZf7izcAko2602Ahi7hcnhCx0t0lk9FkPM
 mWn+Ys7IcjcGn8m3x7OtVeB0TMqaUUhhvXf0oBRv0KFaaTdVKCheS+HG0WmNx2uDzDuV
 RjesBsS4xcqSNIT8XHtFctSwOGuRkmZD1o0eIjzMoAJO3IeLQDtNiyKPg2mB8H/2bclN Hg== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by userp2120.oracle.com with ESMTP id 34dgm4bgta-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Thu, 29 Oct 2020 16:44:34 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09TGfTOd017520;
 Thu, 29 Oct 2020 16:44:34 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userp3030.oracle.com with ESMTP id 34cx6yp5ck-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 29 Oct 2020 16:44:34 +0000
Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 09TGiNAP022236;
 Thu, 29 Oct 2020 16:44:23 GMT
MIME-Version: 1.0
Message-ID: <f39e51ed-25ce-4a15-a716-71e213283ece@default>
Date: Thu, 29 Oct 2020 09:44:18 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>
Subject: RE: bug#5042: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN> <87wo0osspd.fsf@HIDDEN>
 <87lfh3dtoj.fsf@HIDDEN> <878sd1j2rv.fsf@HIDDEN>
 <878sbps834.fsf@HIDDEN>
In-Reply-To: <878sbps834.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5056.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9788
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0
 phishscore=0 spamscore=0
 bulkscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2010290115
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9788
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 lowpriorityscore=0 impostorscore=0
 adultscore=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999
 suspectscore=0 clxscore=1011 mlxscore=0 malwarescore=0 priorityscore=1501
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2010290115
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> >>> 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.
>=20
> 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:
>=20
> 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);
>=20
> 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;
>=20
> 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).

FWIW, I think this belongs on `M-g', and not on
`C-x n' (and not on both).

The aim of the command is to go to a line.  IIUC,
it's not a command that is essentially an action on
the buffer restriction (narrowing).

Users will think of this as a goto-line action, and
they will look for it on a key related to going to
a line number.

As others have pointed out, some users won't even
recognize that Info shows a node by narrowing the
overall buffer (the manual).  They won't look for
the key on `C-x n' (and they shouldn't).

Functions that act on relative, instead of absolute,
file names are still basically about file names or
files, and their names and keys generally reflect
that.  Similarly here - this about going to a
relative line number.  Why a user would most likely
want to do that in Info (answer: because it's
narrowed) is secondary, and can almost remain
unremarked.
___


Which brings us back perhaps to _swapping_ relative
and absolute whenever the buffer is narrowed - the
Info case is just a special case of that.

What about doing that (advertising it prominently)?

By default (add an option, to let users choose),
when the buffer is narrowed the regular absolute
goto-line key goes to a relative line number, and
the regular goto-relative line key goes to an
absolute line number.

That would mentally cement the natural relation
between relative line numbering and narrowed buffer.

But by _swapping_ (and certainly not letting one of
the behaviors grab both keys, as was suggested here),
users always have both behaviors available on keys
(including in Info).

Yes, such swapping would be perhaps a first for
Emacs.  But I think it would end up being pretty
natural, even expected.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 29 Oct 2020 14:32:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 29 10:32:12 2020
Received: from localhost ([127.0.0.1]:54551 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kY8yK-00046n-7U
	for submit <at> debbugs.gnu.org; Thu, 29 Oct 2020 10:32:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53294)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1kY8yI-00046S-AC; Thu, 29 Oct 2020 10:32:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41089)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kY8yB-0006qK-Pt; Thu, 29 Oct 2020 10:32:04 -0400
Received: from [176.228.60.248] (port=4684 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kY8y6-00043g-9B; Thu, 29 Oct 2020 10:32:00 -0400
Date: Thu, 29 Oct 2020 16:31:58 +0200
Message-Id: <83sg9xaysh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <878sbps834.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 29 Oct 2020 11:19:11 +0200)
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN> <878sbps834.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  5042 <at> debbugs.gnu.org,
>   9917 <at> debbugs.gnu.org,  monnier@HIDDEN,  dmoncayo@HIDDEN
> Date: Thu, 29 Oct 2020 11:19:11 +0200
> 
> 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;

Two comments:

 1) display-line-numbers-mode by default behaves the same as
    line-number-mode
 2) display-line-numbers-mode has the display-line-numbers-widen
    option which disregards narrowing, so if you want to follow
    display-line-numbers-mode, you will need to heed that option as
    well

> 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.

I like this the best.

>    Or another idea: maybe it should depend on whether
>    display-line-numbers-mode is enabled or not?

That sounds wrong to me: there's no real relation between these two,
and having the same command behave differently in two buffers doesn't
sound right to me.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 29 Oct 2020 09:20:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 29 05:20:28 2020
Received: from localhost ([127.0.0.1]:51858 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kY46e-0008E6-KA
	for submit <at> debbugs.gnu.org; Thu, 29 Oct 2020 05:20:28 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:56071)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1kY46c-0008Dd-QJ; Thu, 29 Oct 2020 05:20:27 -0400
Received: from mail.gandi.net (m91-129-102-160.cust.tele2.ee [91.129.102.160])
 (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id 8B0D2200004;
 Thu, 29 Oct 2020 09:20:18 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN>
Date: Thu, 29 Oct 2020 11:19:11 +0200
In-Reply-To: <878sd1j2rv.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Tue,
 22 Sep 2020 16:37:40 +0200")
Message-ID: <878sbps834.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 5042
Cc: Eli Zaretskii <eliz@HIDDEN>, dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> 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).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 28 Oct 2020 11:58:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 28 07:58:14 2020
Received: from localhost ([127.0.0.1]:47582 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kXk5m-0005Kg-8b
	for submit <at> debbugs.gnu.org; Wed, 28 Oct 2020 07:58:14 -0400
Received: from mail-ed1-f50.google.com ([209.85.208.50]:46401)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>)
 id 1kXk5k-0005KN-FF; Wed, 28 Oct 2020 07:58:12 -0400
Received: by mail-ed1-f50.google.com with SMTP id t11so2200783edj.13;
 Wed, 28 Oct 2020 04:58:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=X4fRMIfPFrdO1w4EAa39zLg3STtAwusbhcT6IkMSHkk=;
 b=a19TatCIPMWQbSB/rosiKFBBpO3jOTR18tupF7DXjSCJu+MuWZccp9K2CgVs4fu5GK
 bTLjprbUlY51JNMue+6fwA2CZYHTm/wSEq0PBqJtIq3OByCo7Ga00UqZZrQ6AYsohUBC
 II4+e2y7fsgzHgfaqzVXshW7EF+h0qq5NscHA+9HnUvBpPMbWpnbuSX3pyN0NSi//7/c
 nHf4i7suXPBhgV75I5IrhkUSdAtnugx8BQwA1+rJRW2f395KnilPyvgOCF6VVmeS89wr
 OWu13AXt3BLy+CWd8RLqBM5f8bwQ0JiK/nm7/zpglrNujGzyP12CaFBR67YWvNf2HYW+
 56sg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=X4fRMIfPFrdO1w4EAa39zLg3STtAwusbhcT6IkMSHkk=;
 b=AOqvbg1jjipmH9T9mCWe08Qut5RwkRXz/POwiI6Ahv+JllYMeJuUbvrps8mQDU3NSu
 VK/tRY+37Vp3aHbPd/hXcpSD+1kiMtJKs0odhhuvF4XQKl1BFQK5i4FJZrn0taaqLJVO
 1zAFTlMOCfucae7ZNBuhfFFdP+OaSFtkCH/gnIOlQNkq9WczTU/eSnyZwdy1LUI0RBzO
 H18CfpLjrwwTdCAUnv1g8k86vbhEy9X5Scn9wrd74h/Vdj9MRmMccMnOgJ1aLvB5+X3O
 XQi6q1weenzJ3bDjnO1B7qLwZ7yzKyshiIKjjaEQf4HOgwh62KWqHfzc3pLM7KzPghnT
 2mEw==
X-Gm-Message-State: AOAM531UQB7l5l6Pl7xMOCchzi0atg8UMjgfKm5BmRrfoO2lnlaZGPJf
 mm8vWF7fyMy4C6L7zWPRRCY=
X-Google-Smtp-Source: ABdhPJzwpP517kRGOp5t1CaCoO93r4YWtuj338ggsoT7po/18fSRp3Bscn1hAYONobDxOcyjCNY9xQ==
X-Received: by 2002:a05:6402:3045:: with SMTP id
 bu5mr7513276edb.232.1603886286488; 
 Wed, 28 Oct 2020 04:58:06 -0700 (PDT)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id
 bw25sm2880453ejb.119.2020.10.28.04.58.04
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 28 Oct 2020 04:58:05 -0700 (PDT)
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
To: Lars Ingebrigtsen <larsi@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN> <87wo0osspd.fsf@HIDDEN>
 <87lfh3dtoj.fsf@HIDDEN> <87zh478ovp.fsf@HIDDEN>
 <87pn52vfyj.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <0e43a8ea-266e-e324-cd55-cfe07dd28522@HIDDEN>
Date: Wed, 28 Oct 2020 13:58:03 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <87pn52vfyj.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 5042
Cc: dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

On 28.10.2020 11:48, Lars Ingebrigtsen wrote:
> Juri Linkov <juri@HIDDEN> writes:
> 
>> Here is the fix for xref:
> 
> [...]
> 
>> -          (goto-char (or (cdr buffer-point) (point-min)))
>> -          (point-marker))))))
>> +          (save-restriction
>> +            (widen)
>> +            (goto-char (or (cdr buffer-point) (point-min)))
>> +            (point-marker)))))))

If this works, sure, please install. This piece by itself makes sense.

> Hm...  Does Dmitry have any comments here?  (Added to Cc.)

I'm subscribed to the bug tracker, but I skip over a number of 
discussions automatically (and an extra email in a thread is relatively 
easy to miss, too).

In case I don't respond in similar circumstances in the future, may I 
ask for a personal email? One without 'debbugs.gnu.org' in the From/To/Cc.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 28 Oct 2020 09:48:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 28 05:48:57 2020
Received: from localhost ([127.0.0.1]:47223 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kXi4f-0001nj-C7
	for submit <at> debbugs.gnu.org; Wed, 28 Oct 2020 05:48:57 -0400
Received: from quimby.gnus.org ([95.216.78.240]:39640)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1kXi4d-0001nR-CE; Wed, 28 Oct 2020 05:48:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=54oi5fceDbSV3g08IfzEvfiip+5/S/KyHP0g3+bPzHg=; b=RMyZaRPQw/3GaxNgu4Xsmkp0H8
 mN9G+6o1yeI0tiOArIVCe+XQ4oHswvWW8tLPnJygvR6PatiIt9WxWc8yxR/35DSkHwO+Oqiy0LQjY
 NXiJglu6PRyNMj3/Wn6JM2+7HbZCWEeBUDllpHf/Chsuu8SEr7VQj9FQFhpzp6yE4E8o=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kXi4L-0006TO-UF; Wed, 28 Oct 2020 10:48:46 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <87zh478ovp.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXT0caPWlY4Mir/
 //9kTWJkAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QKHAkHFEs0eocAAAGkSURBVCjPVdLBjtowEAbg
 sVUilVO3otHCfQ/kKcKhHHIKVSba+LSHBRU/BSAt0va0IIi0ObGVE+H/KTsGVLU+JP408cS/E6Lb
 UIAP96dwGf2L5IYvfyuDG6KAnzdcGmDNzGlvzmgmhA2MI7JoKiXoG2XdV2zuBXtTSNvcvhSK/BSM
 ZTdknytKNfgTUaHa9ILiWTMPjoKBxsyVZZWXpOi7rg3asuKp4NRtIciKTFAkGXAsp0+xwBgA62X2
 thfIFF4tss1v/U6hcK++ZdFH31OvDz+k+LXX0DCkcqM8PozOpCWVPfi8fyhdAC92j7NsVbt4RtHu
 GY958qM+htirB+MHdsvGL2hFw0nZtEMueELryYtyy/mSWcLhzWtvAS5URTjNowWatuIlCB9pjFr2
 1HrQeXYcQc4WRyuVXCX4bOGZjbyHEh9bzJkbQkrReYQz0ZgJRNpZnCh9uKIDnMauJPl2etuE8Dt7
 AW7jf8iaGLDmCnWqW2APEx7THrWv3bgJiBpYX6J/xS+P9g5rWUhoEPnOYWXDgRiYtmu799CgGpeJ
 /BYsu+Y/5JjZYM8ec9AAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMTAtMjhUMDk6MDc6MjArMDA6
 MDDpuETQAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEwLTI4VDA5OjA3OjIwKzAwOjAwmOX8bAAA
 AABJRU5ErkJggg==
X-Now-Playing: He Said's _Take Care_: "A.B.C. Dicks Love (Soft)"
Date: Wed, 28 Oct 2020 10:48:36 +0100
In-Reply-To: <87zh478ovp.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 27 Oct 2020 22:52:10 +0200")
Message-ID: <87pn52vfyj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: > Here is the fix for
 xref: [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, Dmitry Gutov <dgutov@HIDDEN>, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> Here is the fix for xref:

[...]

> -          (goto-char (or (cdr buffer-point) (point-min)))
> -          (point-marker))))))
> +          (save-restriction
> +            (widen)
> +            (goto-char (or (cdr buffer-point) (point-min)))
> +            (point-marker)))))))

Hm...  Does Dmitry have any comments here?  (Added to Cc.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 27 Oct 2020 20:53:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 27 16:53:29 2020
Received: from localhost ([127.0.0.1]:46119 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kXVyD-0007b6-6b
	for submit <at> debbugs.gnu.org; Tue, 27 Oct 2020 16:53:29 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:57953)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1kXVy9-0007aL-L5; Tue, 27 Oct 2020 16:53:25 -0400
X-Originating-IP: 91.129.102.160
Received: from mail.gandi.net (m91-129-102-160.cust.tele2.ee [91.129.102.160])
 (Authenticated sender: juri@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id AB6AD60006;
 Tue, 27 Oct 2020 20:53:17 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
Date: Tue, 27 Oct 2020 22:52:10 +0200
In-Reply-To: <87lfh3dtoj.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 21 Sep 2020 22:03:44 +0300")
Message-ID: <87zh478ovp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: Eli Zaretskii <eliz@HIDDEN>, dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> This is what for example help-function-def--button-function does:
>
>             ;; Widen the buffer if necessary to go to this position.
>             (when (or (< position (point-min))
>                       (> position (point-max)))
>               (widen))
>             (goto-char position)
>
> Unfortunately, xref doesn't provide such nice feature,
> so 'M-.' fails to navigate in a narrowed buffer.

Here is the fix for xref:

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index eed73f5791..c7ff351845 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -897,8 +897,10 @@ xref-location-marker
     (let ((buffer-point (find-function-search-for-symbol symbol type file)))
       (with-current-buffer (car buffer-point)
         (save-excursion
-          (goto-char (or (cdr buffer-point) (point-min)))
-          (point-marker))))))
+          (save-restriction
+            (widen)
+            (goto-char (or (cdr buffer-point) (point-min)))
+            (point-marker)))))))
 
 (cl-defmethod xref-location-group ((l xref-elisp-location))
   (xref-elisp-location-file l))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 24 Sep 2020 17:31:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 24 13:31:34 2020
Received: from localhost ([127.0.0.1]:41550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kLV5i-0002bt-DC
	for submit <at> debbugs.gnu.org; Thu, 24 Sep 2020 13:31:34 -0400
Received: from aserp2130.oracle.com ([141.146.126.79]:45784)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>)
 id 1kLV5f-0002bb-Pt; Thu, 24 Sep 2020 13:31:33 -0400
Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1])
 by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08OHTdSh033199;
 Thu, 24 Sep 2020 17:31:26 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=Q74jAXA2Bw5fjxJrtSUvCZt9pSvwbHHsb7XRyc6Gxrw=;
 b=ira3nUWkgcRBQCiSyd0UdCB/BqE7uJMtdbB/tooVH3fcyMFGBfhKeDIrbh2tMCybq4xy
 3er5Zde4tseRq/hu9TCW1gjwBGxKnT+ZYTZbzRPpt7wcW+4TYIf4c6jaCMpVJT9UFGkU
 REof9S1zcKAG56qIOIHXNnKuWn3LNFESlcrXkBXqPXNTIdCRgGZK42nMA1nZ4GoJuLko
 TiDgkv4y6oZ0cMCTVu9S1t8jlM/wb4qdyLhI+dX6rdLvgHaaDRzHJlm5ohXjoJeHWnqP
 WGSefrAMEEHf2IasR5SuPKkYntf3H0BVuVjICqrz4HEVg1bAkfmDlm7gxgzh3VNhyu9d GA== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by aserp2130.oracle.com with ESMTP id 33qcpu6jg3-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Thu, 24 Sep 2020 17:31:25 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08OHQBC1076081;
 Thu, 24 Sep 2020 17:31:25 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserp3020.oracle.com with ESMTP id 33r28x9dhp-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 24 Sep 2020 17:31:25 +0000
Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08OHVIxm004980;
 Thu, 24 Sep 2020 17:31:18 GMT
MIME-Version: 1.0
Message-ID: <2ba7ee86-bd69-4299-9e40-b8ee79675c99@default>
Date: Thu, 24 Sep 2020 10:31:17 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
Subject: RE: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the
 line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN> <87wo0osspd.fsf@HIDDEN>
 <87lfh3dtoj.fsf@HIDDEN> <878sd1j2rv.fsf@HIDDEN>
 <871ritbs6t.fsf@HIDDEN> <87mu1gd422.fsf@HIDDEN>
 <e2249a97-b7e0-4b2b-9dba-2d6fa2e5f892@default> <m2sgb739pg.fsf@HIDDEN>
In-Reply-To: <m2sgb739pg.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5056.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9754
 signatures=668680
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0
 mlxlogscore=999
 suspectscore=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0
 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2006250000 definitions=main-2009240129
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9754
 signatures=668680
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 mlxlogscore=999
 adultscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501
 phishscore=0 spamscore=0 malwarescore=0 clxscore=1015 impostorscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009240129
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN,
 Lars Ingebrigtsen <larsi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>     >> Drew objected to rebinding the keystroke in Info
>     >> mode, but I think that's probably fine -- nobody is
>     >> ever going to refer to an absolute line in Info.
>=20
>     Drew> Why do you think so?
>=20
>     Drew> The principle is general.  Logically, this has
>     Drew> nothing to do with the mode or context, except if
>     Drew> the user thinks it does.  No such coupling should
>     Drew> be done automatically (hard-coded).  Just give users
>     Drew> two commands/keys and let them use whichever they
>     Drew> feel is appropriate in any given mode/context.
>=20
>     Drew> You're setting a bad precedent by overruling users
>     Drew> here.  `M-g M-g' should do the same thing, wherever.
>=20
> If I turn on display-line-numbers-mode in an *info* buffer, or have the
> line number displayed in the mode line, those numbers are the narrowed
> line numbers. Having M-g M-g go to the absolute line number there
> would be very confusing as they don=CA=BCt match the visual information
> provided (how many people even know that *info* buffers are narrowed?
> They behave like a linked set of buffers).

Either Info should be made to NOT use narrowing
to simulate what you describe as "a linked set of
buffers", or ordinary considerations of narrowing
apply.

How do you know that an Info buffer is narrowed?
Same way as any other buffer: the mode line says
"(Info Narrow)".  Nothing new here.

Someone decided that relative line numbering was
appropriate as the default behavior for Info.
That's not bad.

And yes, if a user is _not aware_ that line
numbering is relative, and that the buffer is
narrowed, then s?he may mistakenly use `M-g M-g'
to go to what s?he thinks is a normal, i.e.,
absolute line number.

Info is between two chairs.  It should instead be
handled consistently (pick a chair) - either:

1. As an explicitly narrowed buffer, with relative
   line numbers - and a user would then use the
   (new) command and key for going to a relative
   line number.  A user would get that the buffer
   is narrowed, and relative line numbers are
   appropriate.

or

2. As an widened buffer (or with narrowing completely
   imperceptible by users), with absolute line numbers
   - and a user would then use good old `goto-line'
   and its key, `M-g M-g'.

Currently, half the indications for users are that
Info IS narrowed (by default), which it is, and half
of them are that Info is NOT narrowed (which is
incorrect).

We now have two ways to show line numbers and two keys
for going to a line number: relative and absolute.
A user is free to show relative but goto absolute,
or the opposite, or either of the two same-type
combinations - 4 combinations altogether.

A user who is used to `M-g M-g' being goto absolute
will not expect it to sometimes instead become goto
relative behind her back (invisibly).

That a user might not know that Info is narrowed is
a separate problem, which should maybe be addressed.

The fact is that Info IS narrowed (by default).
And Emacs tells you so, pretty clearly.  If you're
aware of that then you're not surprised that Emacs
has chosen to show you relative line numbers (by
default).  But you _will_ be surprised to discover
that `M-g M-g' has changed silently.  And that there
is no longer any key for `goto-line'.

What's needed is some better alignment of things.
Plus better informing of users of what the state is.

As for the goto keys and their commands: they should
be kept separate, and both available at all times.

I mentioned the possibility of swapping the bindings
in the Info setting.  I'm not in favor of any such
key changes, but certainly it's better to swap (if
someone insists that `M-g M-g' needs to become
relative), rather than to just give both keys to
relative goto.

Again, I don't feel strongly about any of this.  I
do, however, think we're making a mistake by doing
what's being done.  In particular because it sets
a bad precedent.

Someone may say that Info is a very special case,
and there won't ever be another like it, and we
have no plan to change how Info represents nodes
(that is, we'll continue to just narrow - it's not
a bad approach, even if it's a bit rudimentary),
and so therefore it's OK to make this special
exception.

Will it continue to be regarded as a special case?
Or will other modes where someone thinks that the
default expectation will be going to relative line
numbers also get `M-g M-g' hijacked for relative
goto?  I unfortunately have to bet on the latter.

If we continue to narrow to Info nodes, and if we
think that the mode-line indication isn't strong
enough, here's a suggestion:

My library zones.el has a Boolean option,
`zz-narrowing-use-fringe-flag', to highlight the
fringe when the buffer is narrowed.  It's then
pretty obvious when you narrow a buffer.  But
until a user has done that, and noticed the
effect, s?he might not get it when just going to
a buffer, like Info, that's already narrowed.

Another possibility is to highlight `Narrow' in
the mode line, at least for Info.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 24 Sep 2020 07:39:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 24 03:39:18 2020
Received: from localhost ([127.0.0.1]:38519 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kLLqY-0006BA-Ae
	for submit <at> debbugs.gnu.org; Thu, 24 Sep 2020 03:39:18 -0400
Received: from mail-wm1-f52.google.com ([209.85.128.52]:37166)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>)
 id 1kLLqV-0006As-AA; Thu, 24 Sep 2020 03:39:17 -0400
Received: by mail-wm1-f52.google.com with SMTP id a9so2518580wmm.2;
 Thu, 24 Sep 2020 00:39:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=lh1ABQ8nvIkTL0UBqFkUBgkhcPruRNyZaP1SgWCj7P4=;
 b=qRlxpvXg1LelzYhybcYibIfBkL26uReaQWOl3B7tJf7cJVvI0I50pmCDuTjEJ4WdOw
 WtG5NvgiZQsWo+WtDKiwbAyDgUVXUaxyyDxVfzh2FGtSsbj+zpzMtsNvuRoADwOJj7Jp
 TC945/cgP2Mc1x/JgxpZaV9rv2hjSNjjxtJxnnoNYfIgCkMDzSjJL1hBNf3RIjJLtPq7
 +3v/zWExY7/ZnhsKs1b/kFvD64KmWeYZG27jd6kkunt75qz7v5mKHzGbK5iDN8L+Nl4V
 wmY/ecyiXH5mHZDzHz48wuRpbILFJb6Bf8/PN6KpaZCiq2uZ5cxLUe58x7bNkEun+a/o
 DXVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=lh1ABQ8nvIkTL0UBqFkUBgkhcPruRNyZaP1SgWCj7P4=;
 b=MOJZtte4J5DyCgou4ajHKKeG5N0rjGoKACLqBDLApnj5rPJJ6iFHzfYvIQYPV3D98F
 RFrJul4ccj4t3dou7J27cRHsdtUd0yp523Za4tA/fijaT1EdLveru3pGfsDcv+ewzqN3
 OnxSi2p0ufRQqOqjbcL2GCXwJZicVrsC1a2jX06cedGgzMD0zgeKBvolgpMLrCMHLMRm
 n5hftL2Mi3ik/DGEBfv3XQ5LOvrCS3pKFyAP5jeuHMq/8D4jPtNPVF8kuzw55snvXeK1
 MfDg0BJbRJnDp2DJE2gzgslyx3A5kE3SYEeoPhVRNJQKpqiZPI3SBVCaeP0CFEUpyc+B
 p91g==
X-Gm-Message-State: AOAM530QgaHWmS6dsmHy0YPkmm5n5r/IwX1osScIXQKbp2Z4Aj5dEED4
 bcQwIQN89tOe4XbssdikIK04UbFa300=
X-Google-Smtp-Source: ABdhPJxtAohJgRhXsCZt6WF3aRRVkJqYots8rBgjyXV3Z+7jDtT3BsvyxGmU3EAPVri5Vz296KnEvQ==
X-Received: by 2002:a1c:9a0c:: with SMTP id c12mr3339395wme.85.1600933148763; 
 Thu, 24 Sep 2020 00:39:08 -0700 (PDT)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:3c08:1d3d:adfd:41da])
 by smtp.gmail.com with ESMTPSA id v2sm2478002wrm.16.2020.09.24.00.39.07
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 24 Sep 2020 00:39:07 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with
 the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN> <871ritbs6t.fsf@HIDDEN>
 <87mu1gd422.fsf@HIDDEN>
 <e2249a97-b7e0-4b2b-9dba-2d6fa2e5f892@default>
Date: Thu, 24 Sep 2020 09:39:07 +0200
In-Reply-To: <e2249a97-b7e0-4b2b-9dba-2d6fa2e5f892@default> (Drew Adams's
 message of "Wed, 23 Sep 2020 10:58:11 -0700 (PDT)")
Message-ID: <m2sgb739pg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN,
 Lars Ingebrigtsen <larsi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Wed, 23 Sep 2020 10:58:11 -0700 (PDT), Drew Adams <drew.adams@orac=
le.com> said:

    >> Drew objected to rebinding the keystroke in Info
    >> mode, but I think that's probably fine -- nobody is ever going to re=
fer
    >> to an absolute line in Info.

    Drew> Why do you think so?

    Drew> The principle is general.  Logically, this has
    Drew> nothing to do with the mode or context, except if
    Drew> the user thinks it does.  No such coupling should
    Drew> be done automatically (hard-coded).  Just give users
    Drew> two commands/keys and let them use whichever they
    Drew> feel is appropriate in any given mode/context.

    Drew> You're setting a bad precedent by overruling users
    Drew> here.  `M-g M-g' should do the same thing, wherever.

If I turn on display-line-numbers-mode in an *info* buffer, or have the
line number displayed in the mode line, those numbers are the narrowed
line numbers. Having M-g M-g go to the absolute line number there
would be very confusing as they don=CA=BCt match the visual information
provided (how many people even know that *info* buffers are narrowed?
They behave like a linked set of buffers).

Robert




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Sep 2020 19:42:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 15:42:18 2020
Received: from localhost ([127.0.0.1]:37917 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kLAeg-0008Qb-CX
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 15:42:18 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:38675)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1kLAee-0008QI-RQ; Wed, 23 Sep 2020 15:42:17 -0400
X-Originating-IP: 91.129.108.13
Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13])
 (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id AE04DC0003;
 Wed, 23 Sep 2020 19:42:07 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
Organization: LINKOV.NET
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>>
 <877dspmzo3.fsf@HIDDEN>> <83zh5l1uqw.fsf@HIDDEN>>
 <87wo0osspd.fsf@HIDDEN>> <87lfh3dtoj.fsf@HIDDEN>>
 <878sd1j2rv.fsf@HIDDEN>> <871ritbs6t.fsf@HIDDEN>>
 <cd8f2969-6705-46c8-b090-03e284b0ba0c@default>>
 <83zh5gvauy.fsf@HIDDEN>>
 <ddbf05f3-7365-4edf-9585-866ce3fe7e86@default>
Date: Wed, 23 Sep 2020 22:40:17 +0300
In-Reply-To: <ddbf05f3-7365-4edf-9585-866ce3fe7e86@default> (Drew Adams's
 message of "Wed, 23 Sep 2020 11:09:53 -0700 (PDT)")
Message-ID: <87o8lwb7tq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
 dmoncayo@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> That Info uses narrowing for this special purpose might be seen as
> a kludge.

Indeed, Info narrowing is an implementation detail irrelevant for most users.
And BTW Info-mode is the only mode that sets widen-automatically to nil.

Now I pushed this change to the trunk because two maintainers confirmed that
this is the right thing to do.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Sep 2020 18:10:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 14:10:14 2020
Received: from localhost ([127.0.0.1]:37795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL9Da-0005Gr-EV
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 14:10:14 -0400
Received: from aserp2130.oracle.com ([141.146.126.79]:59330)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>)
 id 1kL9DZ-0005GT-4Q; Wed, 23 Sep 2020 14:10:13 -0400
Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1])
 by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08NI9WWn161797;
 Wed, 23 Sep 2020 18:10:07 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=AZXoBrKixv9HkTPVM+xBErV6/426C3zralJTkDbRqes=;
 b=SC9lbX1eb0YIk/JtpTVKUa2wS/iGRdF5mL4FoKep0Rj6Uw/wGlczAh8bhZV1KA8kdlvh
 p6o8BbA1cOJ55/FgxudtRI+T1HF0ZDRGCkWzVWmKKx7TLbGAgYWZkI6vRuGpYEn4Gh0h
 saESc+gZDvDfQwx33PYhtViigCbHtXnPIRdwlmhTrSlgCQ14MdHMFJWLqHpduYyW5TzI
 IUJlWIdgiCsHwTip23efhiUO7g5Lkz6TtdnSsf6vB/1Mg4Nfk4z3W+b7Tw0ckoiLKSQ1
 7FJKH1XO70qsnUoTi1wE7W5tsASdboARFSaYporHZANFYjRlEg7FD+7k80L4glHuPNS3 oA== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by aserp2130.oracle.com with ESMTP id 33qcpu0yg3-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Wed, 23 Sep 2020 18:10:07 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08NIA5UO193589;
 Wed, 23 Sep 2020 18:10:07 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserp3020.oracle.com with ESMTP id 33r28vyr11-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 23 Sep 2020 18:10:06 +0000
Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08NI9tZG014968;
 Wed, 23 Sep 2020 18:09:55 GMT
MIME-Version: 1.0
Message-ID: <ddbf05f3-7365-4edf-9585-866ce3fe7e86@default>
Date: Wed, 23 Sep 2020 11:09:53 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Drew Adams <drew.adams@HIDDEN>
Subject: RE: bug#9917: bug#5042: bug#9917: 24.0.90; Make `goto-line'
 consistent with the line number from the minibuffer
References: <<CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>>
 <<877dspmzo3.fsf@HIDDEN>> <<83zh5l1uqw.fsf@HIDDEN>>
 <<87wo0osspd.fsf@HIDDEN>> <<87lfh3dtoj.fsf@HIDDEN>>
 <<878sd1j2rv.fsf@HIDDEN>> <<871ritbs6t.fsf@HIDDEN>>
 <<cd8f2969-6705-46c8-b090-03e284b0ba0c@default>> <<83zh5gvauy.fsf@HIDDEN>>
In-Reply-To: <<83zh5gvauy.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5056.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9753
 signatures=668680
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0
 mlxlogscore=999
 suspectscore=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0
 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2006250000 definitions=main-2009230138
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9753
 signatures=668680
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 mlxlogscore=999
 adultscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501
 phishscore=0 spamscore=0 malwarescore=0 clxscore=1015 impostorscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009230138
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, juri@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> > > 3.2. 'goto-line-relative' is bound in Info mode to `M-g M-g'.
> >
> > I gave my opinion about this.  And it was a reason given
> > for having two different commands: Do not base which
> > command gets the standard key binding on anything to do
> > with the current context - in particular, on whether the
> > buffer is narrowed.
> >
> > Please do _not_ bind `M-g M-g' to anything different in Info.
>=20
> Why not?  We do this kind of thing -- have mode-specific bindings --
> all the time in Emacs.

Because we will now have two commands, with two bindings,
to let users get the behavior they want - in any mode,
any context.

Changing the binding of one of those 2 commands to invoke
the other command, makes no sense.  It takes away a
possibility (one command gets two bindings; the other
gets zero bindings).  And it confuses users.

> > Emacs should not be second-guessing users about this.
>=20
> It's not second-guessing.  Info shows narrowed line numbers in its
> buffers, so from the user POV the key sequence keeps invoking the same
> command.

Info uses narrowing to show a node.  Users can further
use narrowing within a node.  Users can widen, to see
all of a file.  That Info uses narrowing for this
special purpose might be seen as a kludge.  In any
case, it's a different use of narrowing from a user's.

From a user POV the key sequence `M-g M-g' does NOT
keep invoking the same command.  If it invoked the same
command then it would still move to an absolute position.

From a user POV, the user has _lost_ a key binding for
one of the commands, and the other command now has two
bindings.

> I see no problem and don't see why you object so much.

So much?  I just presented my objection; that's all.

I see no reason for this.  I see reasons against it,
both wrt the particular case (Info) and in terms of
setting a bad precedent.

I don't object "so much".  I do think it would be a
mistake.  And it's not necessary.

At the very least, if you insist on this "so much",
then please consider swapping the two command bindings
in Info mode, and advertising this (anomalous swap).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Sep 2020 18:00:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 14:00:31 2020
Received: from localhost ([127.0.0.1]:37775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL94A-0004vw-NV
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 14:00:30 -0400
Received: from aserp2120.oracle.com ([141.146.126.78]:53074)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>)
 id 1kL946-0004vW-UG; Wed, 23 Sep 2020 14:00:28 -0400
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1])
 by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08NHxDXU126286;
 Wed, 23 Sep 2020 18:00:20 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=gX+y2GdPSsSi627p8BeVrSFVhVP1SkedTWg7MpHmvBw=;
 b=QWJOok9wrXMpEKNdCB0AtQbOVqO/somyltDsnmbmVi+FJdghcQmtCas8zNRODNVSyOg7
 tEwCHj+yStOg6NFd36He7pYl5ebAw6YI0ZFBmP22LtlQPf+zmW7Ug3nnJJkjgJ1LaqeC
 FFgFxzaUakMXxMUQ8q1GzsdoksyW+kcpDukxU9wCayD0FVBhr06DlCWrpxnJF3Mxp2sn
 LwABXLSuXhkQr1uttDXhtOs2zSmYTmd4Z1IZqNnuVkCY3BbPE24XrlJ28oxjdx7n4vhv
 9deP8BlW4Feu0QOC7lPalqasDgB+07cETn7M8x1Ao54V/eZ/Ey3B2W78+qWWLIWEVnil 3Q== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by aserp2120.oracle.com with ESMTP id 33q5rgjbm9-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Wed, 23 Sep 2020 18:00:20 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08NHfUHK040194;
 Wed, 23 Sep 2020 17:58:19 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userp3030.oracle.com with ESMTP id 33nux1gsq7-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 23 Sep 2020 17:58:19 +0000
Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08NHwCCW030770;
 Wed, 23 Sep 2020 17:58:15 GMT
MIME-Version: 1.0
Message-ID: <e2249a97-b7e0-4b2b-9dba-2d6fa2e5f892@default>
Date: Wed, 23 Sep 2020 10:58:11 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: RE: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the
 line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN> <87wo0osspd.fsf@HIDDEN>
 <87lfh3dtoj.fsf@HIDDEN> <878sd1j2rv.fsf@HIDDEN>
 <871ritbs6t.fsf@HIDDEN> <87mu1gd422.fsf@HIDDEN>
In-Reply-To: <87mu1gd422.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5056.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9753
 signatures=668680
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0
 mlxscore=0 adultscore=0
 bulkscore=0 mlxlogscore=911 phishscore=0 suspectscore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009230135
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9753
 signatures=668680
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 impostorscore=0
 clxscore=1015 suspectscore=0 phishscore=0 malwarescore=0
 priorityscore=1501 mlxlogscore=918 adultscore=0 bulkscore=0 mlxscore=0
 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2006250000 definitions=main-2009230136
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
 dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Drew objected to rebinding the keystroke in Info
> mode, but I think that's probably fine -- nobody is ever going to refer
> to an absolute line in Info.

Why do you think so?

The principle is general.  Logically, this has
nothing to do with the mode or context, except if
the user thinks it does.  No such coupling should
be done automatically (hard-coded).  Just give users
two commands/keys and let them use whichever they
feel is appropriate in any given mode/context.

You're setting a bad precedent by overruling users
here.  `M-g M-g' should do the same thing, wherever.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Sep 2020 14:14:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 10:14:33 2020
Received: from localhost ([127.0.0.1]:37389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL5XU-0005RV-TW
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 10:14:33 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1kL5XT-0005R7-4j; Wed, 23 Sep 2020 10:14:32 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45115)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kL5XN-0002V1-0x; Wed, 23 Sep 2020 10:14:25 -0400
Received: from [176.228.60.248] (port=4511 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kL5XL-0002mM-LK; Wed, 23 Sep 2020 10:14:24 -0400
Date: Wed, 23 Sep 2020 17:14:29 +0300
Message-Id: <83zh5gvauy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-Reply-To: <cd8f2969-6705-46c8-b090-03e284b0ba0c@default> (message from Drew
 Adams on Tue, 22 Sep 2020 13:10:09 -0700 (PDT))
Subject: Re: bug#9917: bug#5042: bug#9917: 24.0.90;
 Make `goto-line' consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN> <87wo0osspd.fsf@HIDDEN>
 <87lfh3dtoj.fsf@HIDDEN> <878sd1j2rv.fsf@HIDDEN>
 <871ritbs6t.fsf@HIDDEN>
 <cd8f2969-6705-46c8-b090-03e284b0ba0c@default>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, juri@HIDDEN, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 22 Sep 2020 13:10:09 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: dmoncayo@HIDDEN, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
>  5042 <at> debbugs.gnu.org
> 
> > 3.2. 'goto-line-relative' is bound in Info mode to `M-g M-g'.
> 
> I gave my opinion about this.  And it was a reason given
> for having two different commands: Do not base which
> command gets the standard key binding on anything to do
> with the current context - in particular, on whether the
> buffer is narrowed.
> 
> Please do _not_ bind `M-g M-g' to anything different in Info.

Why not?  We do this kind of thing -- have mode-specific bindings --
all the time in Emacs.

> Emacs should not be second-guessing users about this.

It's not second-guessing.  Info shows narrowed line numbers in its
buffers, so from the user POV the key sequence keeps invoking the same
command.

I see no problem and don't see why you object so much.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Sep 2020 13:18:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 23 09:18:58 2020
Received: from localhost ([127.0.0.1]:34822 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kL4fi-0002oQ-6J
	for submit <at> debbugs.gnu.org; Wed, 23 Sep 2020 09:18:58 -0400
Received: from quimby.gnus.org ([95.216.78.240]:44296)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1kL4fg-0002o4-88; Wed, 23 Sep 2020 09:18:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=gx5erAPZpQxX7H1ODA5Clm2pzqKGrw0zxW8X076+bHg=; b=u1bvE3yqbHIsMNkbyDwtSPUkf5
 7HM5HFi80sJJ8vgLU8bjy1CT18Uv7KgjzHWVwtOq53vp9Tmj+IFXIMdeF1vVaKliUIuYSaLI+Fb2A
 J7Htcqx5VoLsnAMHVPjPnxCGbcSvY588v8qwhr3+TXKTs4DZLlmAmYrOnhhsjNsxGpm8=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kL4fW-0007os-Pz; Wed, 23 Sep 2020 15:18:49 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with
 the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN> <871ritbs6t.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUpKCYfHRxIRjxR
 UEhAPjpqaWKEgnn///8ghV9sAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QJFwwgNtL7tjwAAAGISURB
 VDjLnZO/csMgDMaFCZlxfN4pNDuHTpm7dM+Z4wl66fs/QiXiJPhPlmoAW79In/hwAJpQvQT0FsDC
 BthVsgan9wFYxWkFe2Qv3TkAHZdEBsEUe4dfIbYNOgCTUrT8C90WUClXE1JaC9jJewaIa9UhJR8N
 pQraViYFboXbCgY4GY/oYOmS8azxzcuHvEUI2jbgiBhU1MjgKWNugThFSV5cO0Apctwhir/s/lNG
 0VWex+vGvlJTl5dLh/vkNEkryv5h6UN78ucSeV0fkKdNIRf2Ki3yKjDw4YdBWMgr9D5MHQrIrSGQ
 vKeb0WkD+Dbo93zikpBfNw1wqhU0YGD3WzByRXA4iFRpO41c4RWNxPsCGAGAI66AOnoBWVotwUWA
 yiOtgSQ+gYZd4MBY2akF5Q4gr0G+gyg7tpbkOpW+duxytM1NVeAAxUzXHlBOLCUgaxu6FD40P3QM
 VM9/XWUfUphnoDQZIsL5JlWvJ9lZIhByPj4/JEUzmFs1Flc1eBPdO3CAf0bV/gPFW0REvhNm3gAA
 ACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0yM1QxMjozMjo1NCswMDowMPPAF2wAAAAldEVYdGRh
 dGU6bW9kaWZ5ADIwMjAtMDktMjNUMTI6MzI6NTQrMDA6MDCCna/QAAAAAElFTkSuQmCC
X-Now-Playing: Herbert's _Bodily Functions_: "On Reflection"
Date: Wed, 23 Sep 2020 15:18:45 +0200
In-Reply-To: <871ritbs6t.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 22 Sep 2020 21:08:10 +0300")
Message-ID: <87mu1gd422.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: > 1. leaves the
 existing
 'goto-line' completely backward-compatible > (actually a small difference
 is that in a narrowed buffer it displays > now the prompt "Goto absolute
 line:" instead of just "Goto [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: Eli Zaretskii <eliz@HIDDEN>, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

> 1. leaves the existing 'goto-line' completely backward-compatible
>    (actually a small difference is that in a narrowed buffer it displays
>     now the prompt "Goto absolute line:" instead of just "Goto line:")
> 2. adds two optional args RELATIVE and WIDEN to 'goto-line';
> 3. adds two new commands 'goto-line-absolute' and 'goto-line-relative':
> 3.1. 'goto-line-absolute' widens the buffer and doesn't narrow it back;
> 3.2. 'goto-line-relative' is bound in Info mode to `M-g M-g'.
>
> If this is ok, then 'goto-line-relative' could be bound to
> `M-g M-v' and `C-x n g'.

Sounds good to me.  Drew objected to rebinding the keystroke in Info
mode, but I think that's probably fine -- nobody is ever going to refer
to an absolute line in Info.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 22 Sep 2020 20:10:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 22 16:10:23 2020
Received: from localhost ([127.0.0.1]:33522 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKocI-0000US-M5
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 16:10:22 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:33014)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>)
 id 1kKocF-0000U9-Eq; Tue, 22 Sep 2020 16:10:20 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08MK97Nl039435;
 Tue, 22 Sep 2020 20:10:13 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=E444O50rCR8jCNjAXyLDs05AmMDp29IUdjj/mA+9Beo=;
 b=S8zBcu0WzzBajv7Pv+Kret8j0BQeY+Tb4PRXiH3y0kT6sj9kyCSe/Dh0buFoTt3giBXE
 S8ngBrnPeuNXcvtlZGo65WUF/jmXNjad5RFkyiRHMvYGsfgkm4QViZHM6p1tDL3Tzcm2
 zxn6fr4oLk+UOq/bHwBtho7wze4hbLeee/UVgpPDlN9/tuHvautHWd2WOMZxhZo973rH
 9ySYMziQ/D15N/vUj/1AEDD4J1JolxWVl6VTjCnrgkkmJm7/VeCBEwx7GO0uifcB5dyb
 nKGQonEtT/mqWALZsxGcwdFN0YCXQldahmAtU4wf3hNVdpEIRG05FISTSWgwWkt9H7sF LA== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by userp2120.oracle.com with ESMTP id 33ndnueyq1-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Tue, 22 Sep 2020 20:10:13 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08MK9v1F069737;
 Tue, 22 Sep 2020 20:10:13 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserp3020.oracle.com with ESMTP id 33nuw4ubvq-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 22 Sep 2020 20:10:12 +0000
Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08MKAAFZ015410;
 Tue, 22 Sep 2020 20:10:10 GMT
MIME-Version: 1.0
Message-ID: <cd8f2969-6705-46c8-b090-03e284b0ba0c@default>
Date: Tue, 22 Sep 2020 13:10:09 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>
Subject: RE: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the
 line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN> <87wo0osspd.fsf@HIDDEN>
 <87lfh3dtoj.fsf@HIDDEN> <878sd1j2rv.fsf@HIDDEN>
 <871ritbs6t.fsf@HIDDEN>
In-Reply-To: <871ritbs6t.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5056.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9752
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 phishscore=0 malwarescore=0
 mlxscore=0 suspectscore=0 adultscore=0 mlxlogscore=840 bulkscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009220156
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9752
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=0 bulkscore=0
 clxscore=1015 impostorscore=0 mlxlogscore=848 mlxscore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009220156
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
 dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> 3.2. 'goto-line-relative' is bound in Info mode to `M-g M-g'.

I gave my opinion about this.  And it was a reason given
for having two different commands: Do not base which
command gets the standard key binding on anything to do
with the current context - in particular, on whether the
buffer is narrowed.

Please do _not_ bind `M-g M-g' to anything different in Info.

Emacs should not be second-guessing users about this.
The point of having two commands (and two key bindings)
is to let users get the behavior they want, in any
context.  Please do not have the same key bound to
different behaviors for going to a line.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 22 Sep 2020 18:19:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 22 14:19:28 2020
Received: from localhost ([127.0.0.1]:33318 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKmsx-0001nY-Pa
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 14:19:28 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:43177)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1kKmsr-0001mu-5I; Tue, 22 Sep 2020 14:19:22 -0400
Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13])
 (Authenticated sender: juri@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id B5936240007;
 Tue, 22 Sep 2020 18:19:12 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with
 the line number from the minibuffer
Organization: LINKOV.NET
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
 <878sd1j2rv.fsf@HIDDEN>
Date: Tue, 22 Sep 2020 21:08:10 +0300
In-Reply-To: <878sd1j2rv.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Tue,
 22 Sep 2020 16:37:40 +0200")
Message-ID: <871ritbs6t.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 5042
Cc: Eli Zaretskii <eliz@HIDDEN>, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

>>> So a new command and keystroke seems warranted.  How about...
>>> `M-g M-v'?   (The mnemonic is "goto visual line".)
>>
>>   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.

Yep, having both is a win-win situation.

Here is the patch that:

1. leaves the existing 'goto-line' completely backward-compatible
   (actually a small difference is that in a narrowed buffer it displays
    now the prompt "Goto absolute line:" instead of just "Goto line:")
2. adds two optional args RELATIVE and WIDEN to 'goto-line';
3. adds two new commands 'goto-line-absolute' and 'goto-line-relative':
3.1. 'goto-line-absolute' widens the buffer and doesn't narrow it back;
3.2. 'goto-line-relative' is bound in Info mode to `M-g M-g'.

If this is ok, then 'goto-line-relative' could be bound to
`M-g M-v' and `C-x n g'.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=goto-line-relative.patch

diff --git a/lisp/info.el b/lisp/info.el
index e4f75b481f..20633fd059 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4053,6 +4053,7 @@ Info-mode-map
     (define-key map "^" 'Info-up)
     (define-key map "," 'Info-index-next)
     (define-key map "\177" 'Info-scroll-down)
+    (define-key map [remap goto-line] 'goto-line-relative)
     (define-key map [mouse-2] 'Info-mouse-follow-nearest-node)
     (define-key map [follow-link] 'mouse-face)
     (define-key map [XF86Back] 'Info-history-back)
diff --git a/lisp/simple.el b/lisp/simple.el
index 050c81a410..724d2d96aa 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1231,7 +1231,38 @@ goto-line-history
   "History of values entered with `goto-line'.")
 (make-variable-buffer-local 'goto-line-history)
 
-(defun goto-line (line &optional buffer)
+(defun goto-line-read-args (&optional relative)
+  "Read arguments for `goto-line' related commands."
+  (if (and current-prefix-arg (not (consp current-prefix-arg)))
+      (list (prefix-numeric-value current-prefix-arg))
+    ;; Look for a default, a number in the buffer at point.
+    (let* ((default
+	     (save-excursion
+	       (skip-chars-backward "0-9")
+	       (if (looking-at "[0-9]")
+		   (string-to-number
+		    (buffer-substring-no-properties
+		     (point)
+		     (progn (skip-chars-forward "0-9")
+			    (point)))))))
+	   ;; Decide if we're switching buffers.
+	   (buffer
+	    (if (consp current-prefix-arg)
+		(other-buffer (current-buffer) t)))
+	   (buffer-prompt
+	    (if buffer
+		(concat " in " (buffer-name buffer))
+	      "")))
+      ;; Read the argument, offering that number (if any) as default.
+      (list (read-number (format "Goto%s line%s: "
+                                 (if (= (point-min) 1) ""
+                                   (if relative " relative" " absolute"))
+                                 buffer-prompt)
+                         (list default (line-number-at-pos))
+                         'goto-line-history)
+	    buffer))))
+
+(defun goto-line (line &optional buffer relative widen)
   "Go to LINE, counting from line 1 at beginning of buffer.
 If called interactively, a numeric prefix argument specifies
 LINE; without a numeric prefix argument, read LINE from the
@@ -1241,6 +1272,12 @@ goto-line
 move to line LINE there.  If called interactively with \\[universal-argument]
 as argument, BUFFER is the most recently selected other buffer.
 
+If optional argument RELATIVE is non-nil, counting is relative
+from the beginning of the narrowed buffer.
+
+If optional argument WIDEN is non-nil, cancel narrowing
+and leave all lines accessible.
+
 Prior to moving point, this function sets the mark (without
 activating it), unless Transient Mark mode is enabled and the
 mark is already active.
@@ -1252,32 +1289,7 @@ goto-line
 If at all possible, an even better solution is to use char counts
 rather than line counts."
   (declare (interactive-only forward-line))
-  (interactive
-   (if (and current-prefix-arg (not (consp current-prefix-arg)))
-       (list (prefix-numeric-value current-prefix-arg))
-     ;; Look for a default, a number in the buffer at point.
-     (let* ((default
-	      (save-excursion
-		(skip-chars-backward "0-9")
-		(if (looking-at "[0-9]")
-		    (string-to-number
-		     (buffer-substring-no-properties
-		      (point)
-		      (progn (skip-chars-forward "0-9")
-			     (point)))))))
-	    ;; Decide if we're switching buffers.
-	    (buffer
-	     (if (consp current-prefix-arg)
-		 (other-buffer (current-buffer) t)))
-	    (buffer-prompt
-	     (if buffer
-		 (concat " in " (buffer-name buffer))
-	       "")))
-       ;; Read the argument, offering that number (if any) as default.
-       (list (read-number (format "Goto line%s: " buffer-prompt)
-                          (list default (line-number-at-pos))
-                          'goto-line-history)
-	     buffer))))
+  (interactive (goto-line-read-args))
   ;; Switch to the desired buffer, one way or another.
   (if buffer
       (let ((window (get-buffer-window buffer)))
@@ -1286,12 +1298,28 @@ goto-line
   ;; Leave mark at previous position
   (or (region-active-p) (push-mark))
   ;; Move to the specified line number in that buffer.
-  (save-restriction
-    (widen)
-    (goto-char (point-min))
-    (if (eq selective-display t)
-	(re-search-forward "[\n\C-m]" nil 'end (1- line))
-      (forward-line (1- line)))))
+  (if (and (not relative) (not widen))
+      ;; Useless case because it just moves point to the edge of visible portion.
+      (save-restriction
+        (widen)
+        (goto-char (point-min))
+        (if (eq selective-display t)
+	    (re-search-forward "[\n\C-m]" nil 'end (1- line))
+          (forward-line (1- line))))
+    (progn
+      (unless relative (widen))
+      (goto-char (point-min))
+      (if (eq selective-display t)
+	  (re-search-forward "[\n\C-m]" nil 'end (1- line))
+        (forward-line (1- line))))))
+
+(defun goto-line-absolute (line &optional buffer)
+  (interactive (goto-line-read-args))
+  (goto-line line buffer nil t))
+
+(defun goto-line-relative (line &optional buffer)
+  (interactive (goto-line-read-args t))
+  (goto-line line buffer t t))
 
 (defun count-words-region (start end &optional arg)
   "Count the number of words in the region.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 22 Sep 2020 14:37:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 22 10:37:54 2020
Received: from localhost ([127.0.0.1]:32811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKjQX-00007n-V8
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 10:37:54 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60706)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1kKjQW-00007X-3b; Tue, 22 Sep 2020 10:37:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=ppA6HccN3/vClNhBec2RVMDqE8QgzOEpWdjekuf4UYo=; b=DHEVEC/2HFDPf33wTAodW8INEj
 nmMDasTet5+CW8x+EXbAddnON/GU0l7pxwVMudQaDfJ9QgfSziN9RtvN0aZdXGF+Bx5eC4DS8qU4t
 rWC4K9BsNNbD+/j52nxqsPj0J/AzWEfQWz/+pC3ETDnrnPb5Fr2ePxP45XuKMXKraCwk=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kKjQL-0003bI-P1; Tue, 22 Sep 2020 16:37:44 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with
 the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN> <87lfh3dtoj.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX409L89/fiucr2
 z4lVr/H///9iL0ZOAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+QJFg4fHOqm5t0AAAG2SURBVDjLbZKL
 teMgDEQlpQHEugDQcQHOYxtwDv3XtCOBHZK3+BPgRiNpMFFiItyaSFnfg0oqZmTGgreKsJZYOhAi
 PAUvJQDCkgbQVNKYFAdYDqlfQP3tCuRyxdclu1QAs+JpLQAFEE7fEVQjgpHkI0cewLv4BOkGEuV6
 4RNwDhd49OGZUxWrCf1LISFznMi9Srg47jGYRCt+MirCnDP+STlsNYYxNWstEEZSTCVAGSBV1FCV
 vHcaB+GCE8BskrAWQYZaa0hFRMEUgNm9N6sZO+4KaoXF5ADXT68JwYKsLLspB9DU/vZ+nXTuLyvj
 zOnPoR3jhd1atzMZBjt4PDWIw30/NVsMOo4LvPbeATT2CzW6I3awU0PL5BP0Gxg9Ro79lgIQlzra
 MSNsB7mSEzWAbYL+fxDjAqiqtRV0lSjKVhCpRoSMiDz293BmSHGAYdaI04yvxs+hPQB87+zTSw+o
 8MojXGRbQMlG6QJ9wGniBLOsc7ukvoCuQN2r7eq6n29wHG+pFTzb8wa9OpABmoPr0F3usrc11sVF
 XcBzBXUBkTyvUjIAtLZ+p3HgQQ5agOkLmsE3muwfrVOIdBoFJq8AAAAldEVYdGRhdGU6Y3JlYXRl
 ADIwMjAtMDktMjJUMTQ6MzE6MjgrMDA6MDDbH4FOAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5
 LTIyVDE0OjMxOjI4KzAwOjAwqkI58gAAAABJRU5ErkJggg==
X-Now-Playing: Hercules & Love Affair's _Hercules & Love Affair_: "You Belong"
Date: Tue, 22 Sep 2020 16:37:40 +0200
In-Reply-To: <87lfh3dtoj.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 21 Sep 2020 22:03:44 +0300")
Message-ID: <878sd1j2rv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Juri Linkov <juri@HIDDEN> writes: >> 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' that
 currently > contains only 4 keys: [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: Eli Zaretskii <eliz@HIDDEN>, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

>> 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' that currently
> contains only 4 keys:
>
>   C-x n d         narrow-to-defun
>   C-x n n         narrow-to-region
>   C-x n p         narrow-to-page
>   C-x n w         widen
>
> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 21 Sep 2020 19:14:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 21 15:14:35 2020
Received: from localhost ([127.0.0.1]:56255 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKRGl-0007uk-HS
	for submit <at> debbugs.gnu.org; Mon, 21 Sep 2020 15:14:35 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:44241)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1kKRGg-0007tx-Cw; Mon, 21 Sep 2020 15:14:31 -0400
X-Originating-IP: 91.129.108.13
Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13])
 (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 8C1DC20006;
 Mon, 21 Sep 2020 19:14:20 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with
 the line number from the minibuffer
Organization: LINKOV.NET
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
 <87wo0osspd.fsf@HIDDEN>
Date: Mon, 21 Sep 2020 22:03:44 +0300
In-Reply-To: <87wo0osspd.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sun,
 20 Sep 2020 11:28:14 +0200")
Message-ID: <87lfh3dtoj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: Eli Zaretskii <eliz@HIDDEN>, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> However, if people have a narrowed buffer, and are looking at (say) the
> compilation output that says "error on like 45" in a shell, then `M-g g
> 45' will definitely do the wrong thing is we change the command to start
> counting from the start of the narrowed region.

In this case another option is to widen the buffer before going to that line.
This is what for example help-function-def--button-function does:

            ;; Widen the buffer if necessary to go to this position.
            (when (or (< position (point-min))
                      (> position (point-max)))
              (widen))
            (goto-char position)

Unfortunately, xref doesn't provide such nice feature,
so 'M-.' fails to navigate in a narrowed buffer.

For 'M-g M-g' this means removing 'save-restriction' from 'goto-line'.

> 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' that currently
contains only 4 keys:

  C-x n d         narrow-to-defun
  C-x n n         narrow-to-region
  C-x n p         narrow-to-page
  C-x n w         widen

where a new key could be:

  C-x n g         go to narrowed line




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 20 Sep 2020 09:28:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 20 05:28:31 2020
Received: from localhost ([127.0.0.1]:48708 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJve3-0006cY-5D
	for submit <at> debbugs.gnu.org; Sun, 20 Sep 2020 05:28:31 -0400
Received: from quimby.gnus.org ([95.216.78.240]:57868)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1kJve0-0006cG-Nj; Sun, 20 Sep 2020 05:28:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=jYhLohkQqd3PNjhzBP6Ykn2hLt1jSKwjD8v3zlz2WLo=; b=jbB6iiwL4CXHoAHILwC89xG3D1
 s+AqpopT7S0UbhdFVGkqMRi6tVWmVHRiexCdmhPKse9kC7/4twP62auIFJYV7TPmdLkh1uK/iq9Xo
 X8/0JgTScRot2jlTaoVRe+UQu2W8fjb7iT8KupMcqDLaGJ6aEput3QCyDUXUDGGIUSWI=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kJvdn-0005d7-Pm; Sun, 20 Sep 2020 11:28:22 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with
 the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <83zh5l1uqw.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEX8/P3U19a7xcyp
 u8yVoqlpZ1OIhnGZrsR6kKJKSDY2MiUsKBr///9fa0aiAAAAAWJLR0QMgbNRYwAAAAd0SU1FB+QJ
 FAkKHHJV3scAAAGoSURBVDjLpdJBT8IwFADgdgG5roKJR5EL3oRi5lFjRfBMlwwvHmAJR7OY+ANI
 wLs16e47rPwCtz/n6zZgHcGL79BDv76+vNcitA0bHQlC7GNgndrIthHBCBtgdWi75rpzl3NeSsZN
 Smn7hM9934BmAPu0X+d5bAEP1g8a3nJw/QKs0XIUUAfgKgN/B0sGMICrxvlNswIwgL6JOkWJbQZi
 jGUw4J40in+wpwxuOZcQe+iyVQ5CH5fc3cJ5ATcir7GDBsvaoO+y0mBjqcGhYylMsDIY0M8q4HU2
 qkNAo8DROYsD+KAUchxPChDQHXTziXhSqdjIaBUTmSqlRBkax8CC7eDS4iFAVAYc0D4hNR5N8yJ7
 WPUwISdciArof2jjOr+fPCsFcFH6PnjWO+P3dj0xMwjBQ9eff7U7jz9GDQD4af53i40j4yobaeBs
 KBLowyvVQBgOvrxOZ2EMr14BL/xiVqjiCkgRqk3Ugt5lWAZLwmhV6MESmxDrQalELxVQ+7guQ2l/
 c/c/SP7MSNKkCjjrwIXX3VQywjRNo8lwkcReamTwfRjT/Xf8AmV088BEgwQVAAAAJXRFWHRkYXRl
 OmNyZWF0ZQAyMDIwLTA5LTIwVDA5OjEwOjI4KzAwOjAwMTL32gAAACV0RVh0ZGF0ZTptb2RpZnkA
 MjAyMC0wOS0yMFQwOToxMDoyOCswMDowMEBvT2YAAAAASUVORK5CYII=
X-Now-Playing: Andrew Poppy's _On Zang Tuum Tumb (2): Alphabed (a mystery
 dance)_: "Goodbye Mr G"
Date: Sun, 20 Sep 2020 11:28:14 +0200
In-Reply-To: <83zh5l1uqw.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 19 Sep
 2020 21:33:59 +0300")
Message-ID: <87wo0osspd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Eli Zaretskii <eliz@HIDDEN> writes: > So I think it has to
 be a different command. If someone wants to > rebind "M-g g" to that new
 command, they can always do that. I'm sympathetic to the idea of not disrupting
 anybody's workflow. However if the keystroke isn't useful as it is today,
 then changing how it works (so that it's useful) is an option. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
 dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> So I think it has to be a different command.  If someone wants to
> rebind "M-g g" to that new command, they can always do that.

I'm sympathetic to the idea of not disrupting anybody's workflow.
However if the keystroke isn't useful as it is today, then changing how
it works (so that it's useful) is an option.

So: Is `M-g g' (in a narrowed buffer) useful today?  `M-g g 2' will
almost inevitably take you to the start of the buffer, so that's not
useful, and I think is what people are complaining about, because it
just seems to...  unhelpful.

However, if people have a narrowed buffer, and are looking at (say) the
compilation output that says "error on like 45" in a shell, then `M-g g
45' will definitely do the wrong thing is we change the command to start
counting from the start of the narrowed region.

So a new command and keystroke seems warranted.  How about...
`M-g M-v'?   (The mnemonic is "goto visual line".)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 20 Sep 2020 05:35:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 20 01:35:04 2020
Received: from localhost ([127.0.0.1]:48555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJs08-00050V-85
	for submit <at> debbugs.gnu.org; Sun, 20 Sep 2020 01:35:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44734)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1kJs05-0004zt-6P; Sun, 20 Sep 2020 01:35:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58938)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kJrzz-0003oS-Ai; Sun, 20 Sep 2020 01:34:55 -0400
Received: from [176.228.60.248] (port=2114 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kJrzy-000821-Qj; Sun, 20 Sep 2020 01:34:55 -0400
Date: Sun, 20 Sep 2020 08:34:53 +0300
Message-Id: <83mu1l105e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-Reply-To: <03fd834c-9305-4cc8-b0d3-a52992babae6@default> (message from Drew
 Adams on Sat, 19 Sep 2020 14:10:55 -0700 (PDT))
Subject: Re: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the
 line number from the minibuffer
References: <<<CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>>>
 <<<877dspmzo3.fsf@HIDDEN>>> <<<jwv4kntbqep.fsf-monnier+emacs@HIDDEN>>>
 <<<28534d1c-6652-4cfe-acb4-f0a30624f878@default>>>
 <<<83tuvt1qwq.fsf@HIDDEN>>> <<1cfba469-3adf-4287-a1fa-647e4e5e83e2@default>>
 <<83pn6h1pie.fsf@HIDDEN>> <03fd834c-9305-4cc8-b0d3-a52992babae6@default>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 19 Sep 2020 14:10:55 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: monnier@HIDDEN, larsi@HIDDEN, dmoncayo@HIDDEN,
>         9917 <at> debbugs.gnu.org, 5042 <at> debbugs.gnu.org
> 
> > Let a negative prefix arg use line numbering wrt the
> > restriction (region), and let a positive prefix arg
> > use line numbering wrt the buffer (widened).
> > 
> > Likewise for a number read at the prompt: negative for
> > restriction numbering, positive for full-buffer numbering.

IMO, this would be a highly confusing behavior, especially for those
who want goto-line to work in terms of narrowed lines.

> But, as I said recently here, two separate commands
> (and keys) is OK too.

Then let's have that.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 21:11:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 17:11:11 2020
Received: from localhost ([127.0.0.1]:48250 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJk8V-00036J-4B
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 17:11:11 -0400
Received: from userp2130.oracle.com ([156.151.31.86]:47976)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>)
 id 1kJk8Q-00035i-Ry; Sat, 19 Sep 2020 17:11:09 -0400
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08JLARaJ057533;
 Sat, 19 Sep 2020 21:11:01 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=P2VyYjUKs3jYtOx0YTGKxBHXGBNVP1jAhJvhZoAXtmc=;
 b=C6nM3ZUvCXjoR4CiWTR6NXRzr8EK8ZveIMw1HfDlMPk47NH4Sb5G+XJQKNM/Q8FPSexq
 RQk8NsMgKMAaFkjZuvUURc5w/6+7m73e32xecX5iFpRf3pN1yvngOlqtEO8EPcZMXbyd
 BUWzWqruk2jcx60AFoUv6LipUV95E48IYJxPx4c9JOP2pAZs7fB53QdpuW7Tko94qVXV
 gWodDNpObGWa1T7xyjorBiRbqI04pAkjJ2mcx7FhYGthM+pysZPUxPQAw5p8ECEfv2IH
 bNZzZk5MmlJI407LF4jJU4j4+gJ7/TwJjY79fnWqL336yYvTIMpdTrg7cjx41Qi7V84v Vw== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by userp2130.oracle.com with ESMTP id 33n9dqscyn-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Sat, 19 Sep 2020 21:11:01 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08JLADFv126000;
 Sat, 19 Sep 2020 21:11:00 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by userp3020.oracle.com with ESMTP id 33n9ah15g1-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sat, 19 Sep 2020 21:11:00 +0000
Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08JLAuIL006532;
 Sat, 19 Sep 2020 21:10:56 GMT
MIME-Version: 1.0
Message-ID: <03fd834c-9305-4cc8-b0d3-a52992babae6@default>
Date: Sat, 19 Sep 2020 14:10:55 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Drew Adams <drew.adams@HIDDEN>
Subject: RE: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the
 line number from the minibuffer
References: <<<CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>>>
 <<<877dspmzo3.fsf@HIDDEN>>> <<<jwv4kntbqep.fsf-monnier+emacs@HIDDEN>>>
 <<<28534d1c-6652-4cfe-acb4-f0a30624f878@default>>>
 <<<83tuvt1qwq.fsf@HIDDEN>>> <<1cfba469-3adf-4287-a1fa-647e4e5e83e2@default>>
 <<83pn6h1pie.fsf@HIDDEN>>
In-Reply-To: <<83pn6h1pie.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5056.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9749
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0
 suspectscore=0 adultscore=0
 mlxlogscore=999 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009190189
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9749
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 mlxlogscore=999
 phishscore=0 priorityscore=1501 malwarescore=0 mlxscore=0 impostorscore=0
 clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009190189
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > My point is that a user can want _either_ behavior,
> > and there's no way to know which behavior is wanted
> > at any given moment, in any given buffer, whether
> > narrowed or not.
> >
> > IMO, we need either two different commands (& keys)
> > or a command with different prefix-arg behaviors.
>=20
> I suggested the former up-thread (and thought that your response meant
> you are unhappy about that for some reason).  Different prefix-arg
> behaviors would be tricky in this case, I think, because goto-line
> accepts a numeric argument already.

From the outset (and typically), I've been for users
being able to specify the behavior they want, either
on the fly or (if it makes sense) by option.

In the bug #9917 thread I suggested this (in 2011):

> > when someone says "see the line 42 in window.c"
> > then `goto-line' should visit by the absolute line number,
> > ignoring any narrowing in effect.  But when someone says
> > "see the line 42 in the Info node" then it should be relative
> > to the node's beginning.
>=20
> For `goto-line':
>=20
> Let a negative prefix arg use line numbering wrt the
> restriction (region), and let a positive prefix arg
> use line numbering wrt the buffer (widened).
>=20
> Likewise for a number read at the prompt: negative for
> restriction numbering, positive for full-buffer numbering.

But, as I said recently here, two separate commands
(and keys) is OK too.

What I think would be inferior would be _only_ a dwimmy
behavior that doesn't give users a way to control what
happens when it doesn't correspond to some simple
conditional that the dwim relies on.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 20:27:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 16:27:22 2020
Received: from localhost ([127.0.0.1]:48201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJjS5-0008Jf-Vz
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 16:27:22 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33154)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1kJjS4-0008JQ-Pe; Sat, 19 Sep 2020 16:27:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51848)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kJjRy-0004Vw-U0; Sat, 19 Sep 2020 16:27:14 -0400
Received: from [176.228.60.248] (port=4496 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kJjRs-00039i-Tz; Sat, 19 Sep 2020 16:27:12 -0400
Date: Sat, 19 Sep 2020 23:27:05 +0300
Message-Id: <83pn6h1pie.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-Reply-To: <1cfba469-3adf-4287-a1fa-647e4e5e83e2@default> (message from Drew
 Adams on Sat, 19 Sep 2020 13:22:41 -0700 (PDT))
Subject: Re: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the
 line number from the minibuffer
References: <<CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>>
 <<877dspmzo3.fsf@HIDDEN>> <<jwv4kntbqep.fsf-monnier+emacs@HIDDEN>>
 <<28534d1c-6652-4cfe-acb4-f0a30624f878@default>> <<83tuvt1qwq.fsf@HIDDEN>>
 <1cfba469-3adf-4287-a1fa-647e4e5e83e2@default>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 19 Sep 2020 13:22:41 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: monnier@HIDDEN, larsi@HIDDEN, dmoncayo@HIDDEN,
>         9917 <at> debbugs.gnu.org, 5042 <at> debbugs.gnu.org
> 
> My point is that a user can want _either_ behavior,
> and there's no way to know which behavior is wanted
> at any given moment, in any given buffer, whether
> narrowed or not.
> 
> IMO, we need either two different commands (& keys)
> or a command with different prefix-arg behaviors.

I suggested the former up-thread (and thought that your response meant
you are unhappy about that for some reason).  Different prefix-arg
behaviors would be tricky in this case, I think, because goto-line
accepts a numeric argument already.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 20:22:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 16:22:53 2020
Received: from localhost ([127.0.0.1]:48194 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJjNl-0008Co-0z
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 16:22:53 -0400
Received: from aserp2120.oracle.com ([141.146.126.78]:58430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>)
 id 1kJjNi-0008CY-U3; Sat, 19 Sep 2020 16:22:52 -0400
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1])
 by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08JKJ1QU172732;
 Sat, 19 Sep 2020 20:22:45 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=Br8m3YdGvFatHe0PV992+Qa0RKzaRKoWDU8gI0YNh/Q=;
 b=a5zfc3/12il549wE0g+bEUtUd5cQqwEKuEitsmS1NCexKJRTTTXk7uFRjwMC74eKh5L1
 k4TivXqfcNRYNZZnBolUGuq3AvieqOGXeme5e3EoKaNwekTC0jfXdj8n6mphwH4AbRLc
 5VsyX4/cTbY4hTBv9IYPF/hdpXkI55p1WGDlTaKW1RnD+lL5Au1pmsOSdMt/l4/1BXBS
 Rw5JavjaNRZsM7CnRaMndQdksbow1vWl1qTaSbZWV1UfK5IOjMN0vGMZaX7ZB0C55GC1
 ZE48b3oGUG+M2Y3WJWSa0KjvkUZpmZf0fP67M7FbhcfM1xTYqb3fL4QP/+tJTUVWPLF8 6Q== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by aserp2120.oracle.com with ESMTP id 33n9xkhab5-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Sat, 19 Sep 2020 20:22:44 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08JKLIai096809;
 Sat, 19 Sep 2020 20:22:44 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by userp3030.oracle.com with ESMTP id 33n73rshdt-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sat, 19 Sep 2020 20:22:44 +0000
Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 08JKMgn5019585;
 Sat, 19 Sep 2020 20:22:42 GMT
MIME-Version: 1.0
Message-ID: <1cfba469-3adf-4287-a1fa-647e4e5e83e2@default>
Date: Sat, 19 Sep 2020 13:22:41 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Drew Adams <drew.adams@HIDDEN>
Subject: RE: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the
 line number from the minibuffer
References: <<CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>>
 <<877dspmzo3.fsf@HIDDEN>> <<jwv4kntbqep.fsf-monnier+emacs@HIDDEN>>
 <<28534d1c-6652-4cfe-acb4-f0a30624f878@default>> <<83tuvt1qwq.fsf@HIDDEN>>
In-Reply-To: <<83tuvt1qwq.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5056.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9749
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0
 adultscore=0 mlxscore=0
 spamscore=0 suspectscore=0 mlxlogscore=949 phishscore=0 bulkscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009190180
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9749
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 lowpriorityscore=0 malwarescore=0
 suspectscore=0 priorityscore=1501 adultscore=0 spamscore=0 clxscore=1015
 mlxlogscore=965 bulkscore=0 mlxscore=0 phishscore=0 impostorscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009190180
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > In any buffer, including Info, a user can
> > want to go to a line counted from bob or from
> > point-min (current narrowing/restriction).
>=20
> If that is the main use case for this issue, we could
> have a different binding for "M-g g" in Info mode.

It's not about Info mode, or any particular mode.
It's not about whether the buffer happens to be
narrowed.  It's about what the users wants in the
current context.

My point is that a user can want _either_ behavior,
and there's no way to know which behavior is wanted
at any given moment, in any given buffer, whether
narrowed or not.

IMO, we need either two different commands (& keys)
or a command with different prefix-arg behaviors.

We need _some_ way for a user to be able to get
either behavior, regardless of what a "default"
behavior might be.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 19:57:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 15:57:12 2020
Received: from localhost ([127.0.0.1]:48169 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJiyt-0007b3-VT
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 15:57:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56576)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1kJiyo-0007aS-Kt; Sat, 19 Sep 2020 15:57:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51211)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kJiyi-0000zM-Nt; Sat, 19 Sep 2020 15:57:00 -0400
Received: from [176.228.60.248] (port=2654 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kJiyf-0005U4-UR; Sat, 19 Sep 2020 15:56:59 -0400
Date: Sat, 19 Sep 2020 22:56:53 +0300
Message-Id: <83tuvt1qwq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-Reply-To: <28534d1c-6652-4cfe-acb4-f0a30624f878@default> (message from Drew
 Adams on Sat, 19 Sep 2020 12:27:13 -0700 (PDT))
Subject: Re: bug#5042: bug#9917: 24.0.90;
 Make `goto-line' consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <jwv4kntbqep.fsf-monnier+emacs@HIDDEN>
 <28534d1c-6652-4cfe-acb4-f0a30624f878@default>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: larsi@HIDDEN, 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 monnier@HIDDEN, dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 19 Sep 2020 12:27:13 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: Dani Moncayo <dmoncayo@HIDDEN>, 9917 <at> debbugs.gnu.org,
>  5042 <at> debbugs.gnu.org
> 
> In any buffer, including Info, a user can
> want to go to a line counted from bob or from
> point-min (current narrowing/restriction).

If that is the main use case for this issue, we could have a different
binding for "M-g g" in Info mode.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 19:29:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 15:29:25 2020
Received: from localhost ([127.0.0.1]:48147 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJiY1-0006vb-LF
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 15:29:25 -0400
Received: from aserp2120.oracle.com ([141.146.126.78]:51126)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>)
 id 1kJiXy-0006vJ-3X; Sat, 19 Sep 2020 15:29:23 -0400
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1])
 by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08JJTGD1093859;
 Sat, 19 Sep 2020 19:29:16 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=3nwWx9/L40V4F74s1kziVvlnkXtzRNGdHcjnNf+jbHQ=;
 b=oNZNsiaPdv9/SH174NAURbnPHyeEGfH5AJX++mDYXbZN2dFelyAFCap7TMLcnA9BCMQO
 RSHn+Q1cvmCVQxJgYiy60CMXlT75ddk1EGP2gHwEWLa71+r3NGck4iC+ZTxVqLev4WY3
 Sx3jsuCxE03zOBzzWzU6i6PeyPyykaTFC4T8YJ7VWCftPxKZFWe4wSe4yx0d3Vt/n6zr
 TWAuVeJXXA1TCDpmpopsT0fkOxYV5gVchOH0D2WwwUtgqLMwKHAOsvXXIoSutj0R6rsX
 vHi5Sn/HhteI7pp9WJYfPXz/l1nPyp+6YHJrObIELVzAf7LL9/Pl2ZKlGsyTMxS41hL/ fg== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by aserp2120.oracle.com with ESMTP id 33n9xkh92k-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Sat, 19 Sep 2020 19:29:16 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08JJQ8gP006144;
 Sat, 19 Sep 2020 19:27:16 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserp3020.oracle.com with ESMTP id 33na00r54b-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sat, 19 Sep 2020 19:27:15 +0000
Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08JJRDAG013227;
 Sat, 19 Sep 2020 19:27:14 GMT
MIME-Version: 1.0
Message-ID: <28534d1c-6652-4cfe-acb4-f0a30624f878@default>
Date: Sat, 19 Sep 2020 12:27:13 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>, Lars Ingebrigtsen
 <larsi@HIDDEN>
Subject: RE: bug#5042: bug#9917: 24.0.90; Make `goto-line' consistent with the
 line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN> <jwv4kntbqep.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwv4kntbqep.fsf-monnier+emacs@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5056.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9749
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999
 adultscore=0 mlxscore=0
 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009190171
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9749
 signatures=668679
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 lowpriorityscore=0 malwarescore=0
 suspectscore=0 priorityscore=1501 adultscore=0 spamscore=0 clxscore=1011
 mlxlogscore=999 bulkscore=0 mlxscore=0 phishscore=0 impostorscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000
 definitions=main-2009190171
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 Dani Moncayo <dmoncayo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

In any buffer, including Info, a user can
want to go to a line counted from bob or from
point-min (current narrowing/restriction).

(Stefan mentioned the use case of an Info node
that's further narrowed.  There's also the
case of an Info buffer that a user has widened
intentionally.)=20

There's no good way to read a user's mind
about this.

We can have a reasonable _default_ behavior,
and provide the other behavior as an
alternative.

We can do that using a prefix arg (I suggested
a negative one).  Or we can do it by providing
two separate commands.  Or in some other way.

And we could decide to have the default
behavior depend on something (type of buffer
or whatever).  But this might not be the best
approach.  (I think it's probably not.)

In any case, we should give users a way to
choose what they want, whatever the buffer.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 18:34:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 14:34:14 2020
Received: from localhost ([127.0.0.1]:48110 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJhgc-0005ei-2O
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 14:34:14 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43270)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1kJhgZ-0005eR-NG; Sat, 19 Sep 2020 14:34:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49958)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kJhgR-0008Uq-Ui; Sat, 19 Sep 2020 14:34:05 -0400
Received: from [176.228.60.248] (port=1559 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kJhgR-0003ka-F7; Sat, 19 Sep 2020 14:34:03 -0400
Date: Sat, 19 Sep 2020 21:33:59 +0300
Message-Id: <83zh5l1uqw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <877dspmzo3.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sat, 
 19 Sep 2020 19:42:04 +0200)
Subject: Re: bug#5042: bug#9917: 24.0.90;
 Make `goto-line' consistent with the line number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org, monnier@HIDDEN,
 dmoncayo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Date: Sat, 19 Sep 2020 19:42:04 +0200
> Cc: 9917 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
>  5042 <at> debbugs.gnu.org
> 
> Dani Moncayo <dmoncayo@HIDDEN> writes:
> 
> > This discrepancy is quite confusing for users, so my proposal is
> > obvious: adjust the behaviour of `goto-line' to make it consistent
> > with the line number showed in the minibuffer, i.e, to consider its
> > LINE argument relative to the narrowed part if there's one, or else to
> > the whole buffer.
> 
> The suggestion here is to make the interactive `goto-line' go to the
> narrowed-to line instead of the absolute line.  I can see the reasoning
> here -- especially after `display-line-numbers-mode' was added,
> displaying line numbers seems to be getting more popular, and having
> `M-x goto-char' not going to the number you're seeing (if the buffer is
> narrowed) sounds confusing.
> 
> But it is a breaking change -- somewhat.  `goto-line' isn't supposed to
> be used in code, and isn't used in-tree, but who knows what people have
> done out there...

The alternative POV, whereby line numbers are absolute disregarding
the narrowing, is also valid.  What's more important, it was there
first.

So I think it has to be a different command.  If someone wants to
rebind "M-g g" to that new command, they can always do that.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 18:01:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 14:01:18 2020
Received: from localhost ([127.0.0.1]:48065 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJhAk-0002i5-1n
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 14:01:18 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26546)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>)
 id 1kJhAi-0002hk-3h; Sat, 19 Sep 2020 14:01:16 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4AD7D10022D;
 Sat, 19 Sep 2020 14:01:10 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5AE3910022A;
 Sat, 19 Sep 2020 14:01:08 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1600538468;
 bh=wA0NzSvXhfKxIfgxtneecyse9brm29cqiFa/dIzygsk=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=kP2rBiB+wTnX+Tk8+aWLlSQcAeeaxY+tY5ES6XNR47R8wwEG0yiD9nAWLKPMd4UFn
 f9KT4LXa5hQNO0naFwGXAUK7HILP4f+1saN/A55T5kXy/DUdvCc7D1A2YabFw1eIz7
 8EJkd+HfdJNtOX1N/RSfA7plYeiRNKIk8ex1CihKr6HdWe63iviLJ5jnuA+GrEcgMt
 rpSkuuRgOmdY8mjaqlZ6TTXEckKI6K5vovGL67Oyl00bogFLikz8WLxqzt4AV7vrud
 0Nzg14LxtBJhV/pCraMMf2Idfs81sXB9wQzgx9QM+bS8kfzuRBETAQV4HxjIf/nxCC
 edPF9uGio2WPA==
Received: from alfajor (unknown [45.72.232.131])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CC0551204F0;
 Sat, 19 Sep 2020 14:01:07 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#9917: 24.0.90; Make `goto-line' consistent with the line
 number from the minibuffer
Message-ID: <jwv4kntbqep.fsf-monnier+emacs@HIDDEN>
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 <877dspmzo3.fsf@HIDDEN>
Date: Sat, 19 Sep 2020 14:01:07 -0400
In-Reply-To: <877dspmzo3.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sat,
 19 Sep 2020 19:42:04 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.050 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 9917 <at> debbugs.gnu.org,
 Dani Moncayo <dmoncayo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> The suggestion here is to make the interactive `goto-line' go to the
> narrowed-to line instead of the absolute line.  I can see the reasoning
> here -- especially after `display-line-numbers-mode' was added,
> displaying line numbers seems to be getting more popular, and having
> `M-x goto-char' not going to the number you're seeing (if the buffer is
> narrowed) sounds confusing.

I agree that the same should be used for `M-g g` and for the numbers
displayed in `display-line-numbers-mode' or in the mode-line.  I think
all those need some common way to decide if the first line is at
`point-min` or somewhere else.

> But it is a breaking change -- somewhat.  `goto-line' isn't supposed to
> be used in code, and isn't used in-tree, but who knows what people have
> done out there...

Agree.  We used to have calls to `goto-line` in our code, so there's
probably more in the wild.

> We could bind `M-g g' (and friends) to a new command that acts this
> new way?

Fine by me,


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 19 Sep 2020 17:42:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 19 13:42:19 2020
Received: from localhost ([127.0.0.1]:48041 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJgsM-0002EJ-Vf
	for submit <at> debbugs.gnu.org; Sat, 19 Sep 2020 13:42:19 -0400
Received: from quimby.gnus.org ([95.216.78.240]:49436)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1kJgsK-0002E2-MW; Sat, 19 Sep 2020 13:42:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=XyTmoBxbA04BU9G/8ffF6sQUwm3RKJCQAIJYVTffw/0=; b=YemTIqC8qR//AmxJCi5I9aqG68
 D0rodRHC2E5sRsG+ybOXqLtBDIc+2cX1iMDsTkfNukEAAYFGHMKKrxWZJI9aaDodFshcZAc4TcDdL
 kOcolNT49HzVjAG57VOaxKrw0AkZ3YLnWx0ijh6lXL4BG8GV9aQYfCZgK+OXOPj8KT98=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kJgsA-00039t-O7; Sat, 19 Sep 2020 19:42:09 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Dani Moncayo <dmoncayo@HIDDEN>
Subject: Re: bug#9917: 24.0.90; Make `goto-line' consistent with the line
 number from the minibuffer
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
X-Now-Playing: Frankie Goes To Hollywood's _Liverpool_: "For Heaven's Sake"
Date: Sat, 19 Sep 2020 19:42:04 +0200
In-Reply-To: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
 (Dani Moncayo's message of "Mon, 31 Oct 2011 15:31:22 +0100")
Message-ID: <877dspmzo3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Dani Moncayo <dmoncayo@HIDDEN> writes: > This discrepancy
 is quite confusing for users, so my proposal is > obvious: adjust the behaviour
 of `goto-line' to make it consistent > with the line number showed in the
 minibuffer, i.e, to conside [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: 9917 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dani Moncayo <dmoncayo@HIDDEN> writes:

> This discrepancy is quite confusing for users, so my proposal is
> obvious: adjust the behaviour of `goto-line' to make it consistent
> with the line number showed in the minibuffer, i.e, to consider its
> LINE argument relative to the narrowed part if there's one, or else to
> the whole buffer.

The suggestion here is to make the interactive `goto-line' go to the
narrowed-to line instead of the absolute line.  I can see the reasoning
here -- especially after `display-line-numbers-mode' was added,
displaying line numbers seems to be getting more popular, and having
`M-x goto-char' not going to the number you're seeing (if the buffer is
narrowed) sounds confusing.

But it is a breaking change -- somewhat.  `goto-line' isn't supposed to
be used in code, and isn't used in-tree, but who knows what people have
done out there...

We could bind `M-g g' (and friends) to a new command that acts this new
way?

Anybody got any opinions here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.
Forcibly Merged 5042 9917 16173. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Set bug forwarded-to-address to 'http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00143.html'. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 5042 9917. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 3 Feb 2010 05:02:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 03 00:02:09 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NcXNR-0000FA-4X
	for submit <at> debbugs.gnu.org; Wed, 03 Feb 2010 00:02:09 -0500
Received: from gundega.hpl.hp.com ([192.6.19.190])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1NcXNL-0000Eo-8p
	for 5042@HIDDEN; Wed, 03 Feb 2010 00:02:04 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by gundega.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	o1351roQ012365
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 2 Feb 2010 21:01:53 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o1351pxg020181; Tue, 2 Feb 2010 21:01:51 -0800
Date: Tue, 02 Feb 2010 21:01:51 -0800
Message-Id: <qmhy6jayksg.fsf@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-reply-to: <551D8700C30C4A80B2C9D4B11CAD32C9@HIDDEN> (message from
	Drew Adams on Sat, 23 Jan 2010 16:07:04 -0800)
Subject: Re: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN><f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<201001070538.o075cpux020583@HIDDEN><m2wrzta3xn.fsf@HIDDEN>
	<201001100132.o0A1WIxG005631@HIDDEN><f7ccd24b1001091756wd85872esad7328df76233ffe@HIDDEN>
	<201001162208.o0GM8Apr008065@HIDDEN><f7ccd24b1001161503j5dea9288o2ac6a2115b403bb1@HIDDEN>
	<201001232328.o0NNSL55029058@HIDDEN>
	<551D8700C30C4A80B2C9D4B11CAD32C9@HIDDEN>
X-MailScanner-ID: o1351roQ012365
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 5042
Cc: lekktu@HIDDEN, markus.triska@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.3 (---)


>  > What do people think?
>  
>  I think that the proper place to propose and discuss a potential Emacs
>  enhancement is emacs-devel@HIDDEN, not in a specific (though relevant) bug
>  thread. 
>  
>  There is no reason to manage this in the bug tracker, and no reason not to
>  manage (and archive) it in the normal discussion list.
>  
>  Just one opinion.

Good point.  I will move the discussion there.

- Mark





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 24 Jan 2010 09:21:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 24 04:21:48 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NYyfE-00029X-DL
	for submit <at> debbugs.gnu.org; Sun, 24 Jan 2010 04:21:48 -0500
Received: from mail-bw0-f227.google.com ([209.85.218.227])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lekktu@HIDDEN>) id 1NYyez-00029Q-TG
	for 5042@HIDDEN; Sun, 24 Jan 2010 04:21:46 -0500
Received: by bwz27 with SMTP id 27so1872381bwz.1
	for <5042@HIDDEN>;
	Sun, 24 Jan 2010 01:21:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=OWlYocslD7JJqWzJQbiDyP5I7gRNX/k+qagznhc/k/A=;
	b=tz8cHlS4GAyFoXZJqcZsS3TV/KjrMtzolFNtYhOaoC3yeO5I0vWU8hJCUVFXAl204k
	F6LyYcg5NRPWPqoLB7JVYYDWiebE3YIWySSRmG0Ve8Wz9oj2/2Eiv/qtkvvB9LHgSIWU
	2GNuZo8NPYQhL1mDKAUCQtZBaBFZmBh1V3qGc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=FoCm7Se8D4O1gfZuK87NfsdCJrlT/207W3MDvNWzGCnOKZFZuJGW/uCeJtyMziBaNL
	CY3kc4q6QmE4y/ZCCFI9QGUtK45b+j3vgCUCd5tC0wZ8+JAJAKlZuYxQrfp2EIeMELoV
	9pdfFeXmR0WmW5Ugar0K2vPnpmDGVeG3l8wo8=
MIME-Version: 1.0
Received: by 10.204.15.4 with SMTP id i4mr707499bka.21.1264324890118; Sun, 24 
	Jan 2010 01:21:30 -0800 (PST)
In-Reply-To: <201001232328.o0NNSL55029058@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN> 
	<201001070538.o075cpux020583@HIDDEN>
	<m2wrzta3xn.fsf@HIDDEN> 
	<201001100132.o0A1WIxG005631@HIDDEN>
	<f7ccd24b1001091756wd85872esad7328df76233ffe@HIDDEN> 
	<201001162208.o0GM8Apr008065@HIDDEN>
	<f7ccd24b1001161503j5dea9288o2ac6a2115b403bb1@HIDDEN> 
	<201001232328.o0NNSL55029058@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Sun, 24 Jan 2010 10:21:10 +0100
Message-ID: <f7ccd24b1001240121r311b5273o5bff298728039648@HIDDEN>
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
To: mark.lillibridge@HIDDEN
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, markus.triska@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

On Sun, Jan 24, 2010 at 00:28, Mark Lillibridge <mark.lillibridge@HIDDEN> w=
rote:

> I suggest
> calling this "restart-numbering-restriction" with possible values t and
> nil (=3Dfalse). =C2=A0Is this naming convention/description okay?

The name is OK, I think.

> =C2=A0 emacs > editing > editing basics group
> =C2=A0 =C2=A0 "most basic editing facilities."
>
> The first group here really seems to only be for Linum features, which
> this is not. =C2=A0It does look like a reasonable place a a user might
> search/discover this option. =C2=A0I'm not sure if I can declare a variab=
le
> in that group without actually requiring Linum to be loaded first.

Not in the linum group, no. This is not dependend on linum (though it
would use the variable); editing basics seems reasonable.

> (defcustum restart-numbering-restriction nil
> =C2=A0 =C2=A0"How should the lines of a restriction be numbered? =C2=A0No=
rmally, they receive the same line numbers as if no restriction existed (e.=
g., if the first line of the restriction is line number 10 of the file then=
 it receives line number 10. =C2=A0If this variable is true, the lines of t=
he restriction are instead numbered from 1."
> =C2=A0 =C2=A0:group ???
> =C2=A0 =C2=A0:type =C2=A0'(boolean))

More like this, I'd say:

(defcustom restart-numbering-restriction nil
  "If true, lines inside a restriction are numbered starting from 1.
If false, line numbers correspond to position inside the buffer."
  :group ???
  :type  'boolean)


    Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 24 Jan 2010 00:07:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 23 19:07:44 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NYq12-0005Zp-A8
	for submit <at> debbugs.gnu.org; Sat, 23 Jan 2010 19:07:44 -0500
Received: from rcsinet12.oracle.com ([148.87.113.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>) id 1NYq0m-0005Zg-CN
	for 5042@HIDDEN; Sat, 23 Jan 2010 19:07:42 -0500
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by rcsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id
	o0O07Mfq030867
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sun, 24 Jan 2010 00:07:24 GMT
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id
	o0O079fd019594; Sun, 24 Jan 2010 00:07:09 GMT
Received: from abhmt003.oracle.com by acsmt358.oracle.com
	with ESMTP id 1462294321264291618; Sat, 23 Jan 2010 18:06:58 -0600
Received: from dradamslap1 (/24.5.185.59)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Sat, 23 Jan 2010 16:06:57 -0800
From: "Drew Adams" <drew.adams@HIDDEN>
To: "'Mark Lillibridge'" <mark.lillibridge@HIDDEN>, <lekktu@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN><f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<201001070538.o075cpux020583@HIDDEN><m2wrzta3xn.fsf@HIDDEN>
	<201001100132.o0A1WIxG005631@HIDDEN><f7ccd24b1001091756wd85872esad7328df76233ffe@HIDDEN>
	<201001162208.o0GM8Apr008065@HIDDEN><f7ccd24b1001161503j5dea9288o2ac6a2115b403bb1@HIDDEN>
	<201001232328.o0NNSL55029058@HIDDEN>
Subject: RE: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
Date: Sat, 23 Jan 2010 16:07:04 -0800
Message-ID: <551D8700C30C4A80B2C9D4B11CAD32C9@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <201001232328.o0NNSL55029058@HIDDEN>
Thread-Index: AcqchYbSJlMSkdC1Qam/QVIkKouf/AAA0eLg
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090205.4B5B8F3A.00D0:SCFMA4539814,ss=1,fgs=0
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, markus.triska@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.4 (------)

> What do people think?

I think that the proper place to propose and discuss a potential Emacs
enhancement is emacs-devel@HIDDEN, not in a specific (though relevant) bug
thread. 

There is no reason to manage this in the bug tracker, and no reason not to
manage (and archive) it in the normal discussion list.

Just one opinion.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Jan 2010 23:28:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 23 18:28:34 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NYpP8-0005Hh-ML
	for submit <at> debbugs.gnu.org; Sat, 23 Jan 2010 18:28:34 -0500
Received: from gundega.hpl.hp.com ([192.6.19.190])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1NYpP6-0005Ha-Qm
	for 5042@HIDDEN; Sat, 23 Jan 2010 18:28:33 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by gundega.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	o0NNSNl5010425
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 23 Jan 2010 15:28:23 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o0NNSL55029058; Sat, 23 Jan 2010 15:28:21 -0800
Date: Sat, 23 Jan 2010 15:28:21 -0800
Message-Id: <201001232328.o0NNSL55029058@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: lekktu@HIDDEN
In-reply-to: <f7ccd24b1001161503j5dea9288o2ac6a2115b403bb1@HIDDEN>
	(message from Juanma Barranquero on Sun, 17 Jan 2010 00:03:34 +0100)
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN> 
	<201001070538.o075cpux020583@HIDDEN>
	<m2wrzta3xn.fsf@HIDDEN> 
	<201001100132.o0A1WIxG005631@HIDDEN>
	<f7ccd24b1001091756wd85872esad7328df76233ffe@HIDDEN> 
	<201001162208.o0GM8Apr008065@HIDDEN>
	<f7ccd24b1001161503j5dea9288o2ac6a2115b403bb1@HIDDEN>
X-MailScanner-ID: o0NNSNl5010425
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, markus.triska@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)


    Ok, I have pulled the source code from the CVS repository and I'm
starting to work on the new feature/bug fix.

    We are creating a new variable that determines whether or not to
restart numbering lines at the start of a restriction.  I suggest
calling this "restart-numbering-restriction" with possible values t and
nil (=false).  Is this naming convention/description okay?


    Second, this should clearly be a customizable variable, thus created
with defcustom in some group.  The question is, which group?  Some quick
browsing with M-x customize suggests the reasonable possibilities are:

   emacs > convenience > Linum
     "Show line numbers in the left margin."

   emacs > editing > editing basics group
     "most basic editing facilities."

The first group here really seems to only be for Linum features, which
this is not.  It does look like a reasonable place a a user might
search/discover this option.  I'm not sure if I can declare a variable
in that group without actually requiring Linum to be loaded first.

What do people think?
- Mark


(defcustum restart-numbering-restriction nil
    "How should the lines of a restriction be numbered?  Normally, they receive the same line numbers as if no restriction existed (e.g., if the first line of the restriction is line number 10 of the file then it receives line number 10.  If this variable is true, the lines of the restriction are instead numbered from 1."
    :group ???
    :type  '(boolean))





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 16 Jan 2010 23:04:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 16 18:04:01 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NWHgX-00066q-F8
	for submit <at> debbugs.gnu.org; Sat, 16 Jan 2010 18:04:01 -0500
Received: from mail-bw0-f227.google.com ([209.85.218.227])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lekktu@HIDDEN>) id 1NWHgU-00066h-QA
	for 5042@HIDDEN; Sat, 16 Jan 2010 18:03:59 -0500
Received: by bwz27 with SMTP id 27so1347026bwz.1
	for <5042@HIDDEN>;
	Sat, 16 Jan 2010 15:03:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=anV+RZfZw0v9gnat1rglozO1t2wi/RLK80qEKWk/O5U=;
	b=NPergZGliz1/TZ61mYdsjni6pW1sXCU/+QyLaN9SCkKXR1hh+GiYKtPLM8o+Ierepa
	fUjZV/tDy8tu6IrH+iohjdYFQtGTKnLIancRKtydgrP385KcQzm2FG5Ycy5H9VNuOEzm
	O3OCcvKmd4G3l0w5mhP65d2icJ5Ave5vG4TXs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=v8QdHx0KFe5sNlssH51WzvlwVSSvIV6uU5UG45EvTzjyazViIkR5foY7KGOp+wWgXW
	20hClrQ2PgGSB5hJb42oNuU8yuU+2BwPy1Ep5vnCXKUt5dP66AEG8Ez+P+OPTN6Nw828
	7UMRXbqqlxxTtpapNvPEhV1PMW3FR0hHuqPvg=
MIME-Version: 1.0
Received: by 10.204.38.84 with SMTP id a20mr267045bke.39.1263683034152; Sat, 
	16 Jan 2010 15:03:54 -0800 (PST)
In-Reply-To: <201001162208.o0GM8Apr008065@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN> 
	<201001070538.o075cpux020583@HIDDEN>
	<m2wrzta3xn.fsf@HIDDEN> 
	<201001100132.o0A1WIxG005631@HIDDEN>
	<f7ccd24b1001091756wd85872esad7328df76233ffe@HIDDEN> 
	<201001162208.o0GM8Apr008065@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Sun, 17 Jan 2010 00:03:34 +0100
Message-ID: <f7ccd24b1001161503j5dea9288o2ac6a2115b403bb1@HIDDEN>
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
To: mark.lillibridge@HIDDEN
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, markus.triska@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

On Sat, Jan 16, 2010 at 23:08, Mark Lillibridge <mark.lillibridge@HIDDEN> w=
rote:

> =C2=A0 =C2=A0Okay, I will start working on an implementation of this. =C2=
=A0Is there a
> document somewhere on the preferred method for doing this? =C2=A0E.g., pu=
ll
> from the repository, edit, and post diffs?

Yes, that will work.

    Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 16 Jan 2010 22:08:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 16 17:08:26 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NWGok-00043S-EE
	for submit <at> debbugs.gnu.org; Sat, 16 Jan 2010 17:08:26 -0500
Received: from madara.hpl.hp.com ([192.6.19.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1NWGoh-00043L-It
	for 5042@HIDDEN; Sat, 16 Jan 2010 17:08:24 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by madara.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	o0GM8CrY016990
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Sat, 16 Jan 2010 14:08:12 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o0GM8Apr008065; Sat, 16 Jan 2010 14:08:10 -0800
Date: Sat, 16 Jan 2010 14:08:10 -0800
Message-Id: <201001162208.o0GM8Apr008065@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: lekktu@HIDDEN
In-reply-to: <f7ccd24b1001091756wd85872esad7328df76233ffe@HIDDEN>
	(message from Juanma Barranquero on Sun, 10 Jan 2010 02:56:00 +0100)
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN> 
	<201001070538.o075cpux020583@HIDDEN>
	<m2wrzta3xn.fsf@HIDDEN> 
	<201001100132.o0A1WIxG005631@HIDDEN>
	<f7ccd24b1001091756wd85872esad7328df76233ffe@HIDDEN>
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: -5.3 (-----)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, markus.triska@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.4 (-----)


Juanma wrote:
> On Sun, Jan 10, 2010 at 02:32, Mark Lillibridge
> <mark.lillibridge@HIDDEN> wrote:
> 
> >    That's a good idea.  We could add a buffer local variable that
> > determines how to number lines when a restriction is in effect.
> 
> I agree. (Post-release, of course.)

    Okay, I will start working on an implementation of this.  Is there a
document somewhere on the preferred method for doing this?  E.g., pull
from the repository, edit, and post diffs?  

- Thanks,
  Mark






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 10 Jan 2010 02:06:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 09 21:06:28 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NTnCF-0001Pc-RI
	for submit <at> debbugs.gnu.org; Sat, 09 Jan 2010 21:06:27 -0500
Received: from fg-out-1718.google.com ([72.14.220.154])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lennart.borgman@HIDDEN>) id 1NTnCB-0001PK-0Y
	for 5042 <at> debbugs.gnu.org; Sat, 09 Jan 2010 21:06:23 -0500
Received: by fg-out-1718.google.com with SMTP id 19so219034fgg.15
	for <5042 <at> debbugs.gnu.org>; Sat, 09 Jan 2010 18:06:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=EO58iO3UmnR27Hjlqb8deOt0aMSK7m6oPz19qV2DF+U=;
	b=pxxki6yR41/fULptdee9HPQyD66Qp7Y3b6lFOxk8+/7mj9pzyc3CGqKyhVjJFQalql
	TsQyNgOPu/8cY1E1boqHYch6QLMLdOslnBS465TsKdMtES7Jf+wTc0V3tItNXIF1znTD
	8aom/X3Rp0tXqRFAIVvXx/H9B1dmGXvIVnkTQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=FwZjHvpObyVn4xI97Bbv1MVWo8H0I946nSyv1S/PqYC33ABigdZmr6EEujuyzyc77M
	NCx1yOVGK2jXMBt2xzy9dHRQFEgacJ/pPpEMGDLVadN91EWSvkY6h4rNDB3lSen8zawE
	Eoqr4cDYLOXVlU8vqLbUvWC8dxGlBppgF+XFU=
MIME-Version: 1.0
Received: by 10.239.192.79 with SMTP id d15mr720532hbi.52.1263089178119; Sat, 
	09 Jan 2010 18:06:18 -0800 (PST)
In-Reply-To: <201001100132.o0A1WIxG005631@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN> 
	<201001070538.o075cpux020583@HIDDEN>
	<m2wrzta3xn.fsf@HIDDEN> 
	<201001100132.o0A1WIxG005631@HIDDEN>
From: Lennart Borgman <lennart.borgman@HIDDEN>
Date: Sun, 10 Jan 2010 03:05:58 +0100
Message-ID: <e01d8a51001091805u54f6facmbc6f12327114b71a@HIDDEN>
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
To: mark.lillibridge@HIDDEN, 5042 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 5042
Cc: lekktu@HIDDEN, markus.triska@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

On Sun, Jan 10, 2010 at 2:32 AM, Mark Lillibridge
<mark.lillibridge@HIDDEN> wrote:
>
> =C2=A0 =C2=A0That's a good idea. =C2=A0We could add a buffer local variab=
le that
> determines how to number lines when a restriction is in effect. =C2=A0Rma=
il,
> Info, and similar modes could set this variable for their buffers to
> start numbering the visible restriction at 1. =C2=A0Other buffers would
> depend on the user's global customization setting. =C2=A0goto-line, linum=
,
> and related features would consult this variable.
>
> =C2=A0 =C2=A0I don't know any good arguments for which way to set the glo=
bal
> default.


External utilities will use the whole file. So if the file is to be
touched by external utilities (like grep) then I think  the default
should be to start numbering from the file's beginning.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 10 Jan 2010 02:06:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 09 21:06:25 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NTnCC-0001PW-B1
	for submit <at> debbugs.gnu.org; Sat, 09 Jan 2010 21:06:24 -0500
Received: from fg-out-1718.google.com ([72.14.220.154])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lennart.borgman@HIDDEN>) id 1NTnCA-0001PL-Rp
	for 5042@HIDDEN; Sat, 09 Jan 2010 21:06:23 -0500
Received: by fg-out-1718.google.com with SMTP id 19so1786618fgg.13
	for <5042@HIDDEN>;
	Sat, 09 Jan 2010 18:06:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=EO58iO3UmnR27Hjlqb8deOt0aMSK7m6oPz19qV2DF+U=;
	b=pxxki6yR41/fULptdee9HPQyD66Qp7Y3b6lFOxk8+/7mj9pzyc3CGqKyhVjJFQalql
	TsQyNgOPu/8cY1E1boqHYch6QLMLdOslnBS465TsKdMtES7Jf+wTc0V3tItNXIF1znTD
	8aom/X3Rp0tXqRFAIVvXx/H9B1dmGXvIVnkTQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=FwZjHvpObyVn4xI97Bbv1MVWo8H0I946nSyv1S/PqYC33ABigdZmr6EEujuyzyc77M
	NCx1yOVGK2jXMBt2xzy9dHRQFEgacJ/pPpEMGDLVadN91EWSvkY6h4rNDB3lSen8zawE
	Eoqr4cDYLOXVlU8vqLbUvWC8dxGlBppgF+XFU=
MIME-Version: 1.0
Received: by 10.239.192.79 with SMTP id d15mr720532hbi.52.1263089178119; Sat, 
	09 Jan 2010 18:06:18 -0800 (PST)
In-Reply-To: <201001100132.o0A1WIxG005631@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN> 
	<201001070538.o075cpux020583@HIDDEN>
	<m2wrzta3xn.fsf@HIDDEN> 
	<201001100132.o0A1WIxG005631@HIDDEN>
From: Lennart Borgman <lennart.borgman@HIDDEN>
Date: Sun, 10 Jan 2010 03:05:58 +0100
Message-ID: <e01d8a51001091805u54f6facmbc6f12327114b71a@HIDDEN>
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
To: mark.lillibridge@HIDDEN, 5042 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 5042
Cc: lekktu@HIDDEN, markus.triska@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

On Sun, Jan 10, 2010 at 2:32 AM, Mark Lillibridge
<mark.lillibridge@HIDDEN> wrote:
>
> =C2=A0 =C2=A0That's a good idea. =C2=A0We could add a buffer local variab=
le that
> determines how to number lines when a restriction is in effect. =C2=A0Rma=
il,
> Info, and similar modes could set this variable for their buffers to
> start numbering the visible restriction at 1. =C2=A0Other buffers would
> depend on the user's global customization setting. =C2=A0goto-line, linum=
,
> and related features would consult this variable.
>
> =C2=A0 =C2=A0I don't know any good arguments for which way to set the glo=
bal
> default.


External utilities will use the whole file. So if the file is to be
touched by external utilities (like grep) then I think  the default
should be to start numbering from the file's beginning.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 10 Jan 2010 01:56:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 09 20:56:26 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NTn2Y-0001Kt-IP
	for submit <at> debbugs.gnu.org; Sat, 09 Jan 2010 20:56:26 -0500
Received: from mail-bw0-f227.google.com ([209.85.218.227])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lekktu@HIDDEN>) id 1NTn2W-0001Kn-FE
	for 5042@HIDDEN; Sat, 09 Jan 2010 20:56:25 -0500
Received: by bwz27 with SMTP id 27so12526640bwz.1
	for <5042@HIDDEN>;
	Sat, 09 Jan 2010 17:56:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=LxuRqDUQaM3EExXJlraz9AY1JT78ablkDRio8RBew9I=;
	b=vxAp8gwO0XX72m2UoO4j0jqr8XuxySqOSEMHY4aQ+MX8O6O3zTZdmEdDYdtHMI8n66
	90S3R7nBD8x4O5n6V27eaemV9FYrTM2qv7lLaN/xur8+4QXHaCs53/HPRKLoMKYzFFo0
	5a+gEK4TU+5E0GbO4RmzwMn1Z6V/ni2OrIMns=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=eVY+2WSYT6gj0iAl07uxKChfDu13PMPJi2JSnEqKxi2au9mNtKCXAeE/88NlP49mfe
	VYJ/qKSoDx7ivYy1H6x6fARSQQun46QJPxG4hckEoaHKGrVOp/gonEHUZ1kZ0FLsGCqm
	Ma/oizCuDHSBSNowZ8yj33Sep5RDKjPawZ/dg=
MIME-Version: 1.0
Received: by 10.204.10.19 with SMTP id n19mr1034711bkn.19.1263088580137; Sat, 
	09 Jan 2010 17:56:20 -0800 (PST)
In-Reply-To: <201001100132.o0A1WIxG005631@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN> 
	<201001070538.o075cpux020583@HIDDEN>
	<m2wrzta3xn.fsf@HIDDEN> 
	<201001100132.o0A1WIxG005631@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Sun, 10 Jan 2010 02:56:00 +0100
Message-ID: <f7ccd24b1001091756wd85872esad7328df76233ffe@HIDDEN>
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
To: mark.lillibridge@HIDDEN
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, markus.triska@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

On Sun, Jan 10, 2010 at 02:32, Mark Lillibridge <mark.lillibridge@HIDDEN> w=
rote:

> =C2=A0 =C2=A0That's a good idea. =C2=A0We could add a buffer local variab=
le that
> determines how to number lines when a restriction is in effect.

I agree. (Post-release, of course.)

> =C2=A0 =C2=A0I don't know any good arguments for which way to set the glo=
bal
> default.

Same here.

    Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 10 Jan 2010 01:32:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 09 20:32:35 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NTmfS-0001AO-V9
	for submit <at> debbugs.gnu.org; Sat, 09 Jan 2010 20:32:35 -0500
Received: from madara.hpl.hp.com ([192.6.19.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1NTmfQ-0001AI-I7
	for 5042@HIDDEN; Sat, 09 Jan 2010 20:32:33 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by madara.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	o0A1WKTT008517
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Sat, 9 Jan 2010 17:32:20 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o0A1WIxG005631; Sat, 9 Jan 2010 17:32:18 -0800
Date: Sat, 9 Jan 2010 17:32:18 -0800
Message-Id: <201001100132.o0A1WIxG005631@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: markus.triska@HIDDEN
In-reply-to: <m2wrzta3xn.fsf@HIDDEN> (message from Markus Triska on Fri, 8 Jan
	2010 00:30:28 +0100)
Subject: Re: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<201001070538.o075cpux020583@HIDDEN>
	<m2wrzta3xn.fsf@HIDDEN>
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: -5.1 (-----)
X-Debbugs-Envelope-To: 5042
Cc: lekktu@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.2 (-----)


Markus wrote:
>  In my opinion, a more general solution than only for linum.el would be
>  best, one that also makes for example line-number-mode show line numbers
>  that work as expected with M-x goto-line RET also for narrowed buffers.
>  Ideally, it should work without having to customize each of these
>  features (and new modes in the future) separately. I think a promising
>  suggestion (found in this thread) is to generalise narrowing itself,
>  possibly with a single new customization option instead of many.

    That's a good idea.  We could add a buffer local variable that
determines how to number lines when a restriction is in effect.  Rmail,
Info, and similar modes could set this variable for their buffers to
start numbering the visible restriction at 1.  Other buffers would
depend on the user's global customization setting.  goto-line, linum,
and related features would consult this variable.

    I don't know any good arguments for which way to set the global
default.


    What do people think of this plan?  The alternative KISS strategy is
to just make line numbering always start with one for restrictions; I
think this makes everybody happy.  The downside is that you can't see
the external line numbers of lines while you have restricted the buffer
and you can't go to lines by their external line number while you have
restricted the buffer.  I, at least, don't use narrow (interactively)
enough that that these drawbacks would matter.

- Mark






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 7 Jan 2010 23:52:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 07 18:52:36 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NT29b-0003sP-5y
	for submit <at> debbugs.gnu.org; Thu, 07 Jan 2010 18:52:35 -0500
Received: from mail.gmx.net ([213.165.64.20])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <markus.triska@HIDDEN>) id 1NT1oJ-0003gU-G4
	for 5042@HIDDEN; Thu, 07 Jan 2010 18:30:36 -0500
Received: (qmail invoked by alias); 07 Jan 2010 23:30:30 -0000
Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-imac.local)
	[62.178.240.212]
	by mail.gmx.net (mp005) with SMTP; 08 Jan 2010 00:30:30 +0100
X-Authenticated: #4064391
X-Provags-ID: V01U2FsdGVkX19ExCQL7X9EmDrM8KSbnzVeZGMCewAMkEh3D5coHh
	xAOncpDNugA960
Received: by mt-imac.local (Postfix, from userid 501)
	id 610645411E4; Fri,  8 Jan 2010 00:30:28 +0100 (CET)
From: Markus Triska <markus.triska@HIDDEN>
To: mark.lillibridge@HIDDEN
Subject: Re: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<201001070538.o075cpux020583@HIDDEN>
Date: Fri, 08 Jan 2010 00:30:28 +0100
Message-ID: <m2wrzta3xn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.74
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 5042
X-Mailman-Approved-At: Thu, 07 Jan 2010 18:52:33 -0500
Cc: lekktu@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

Mark Lillibridge <mark.lillibridge@HIDDEN> writes:

>  waiting on your opinion.

In my opinion, a more general solution than only for linum.el would be
best, one that also makes for example line-number-mode show line numbers
that work as expected with M-x goto-line RET also for narrowed buffers.
Ideally, it should work without having to customize each of these
features (and new modes in the future) separately. I think a promising
suggestion (found in this thread) is to generalise narrowing itself,
possibly with a single new customization option instead of many.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 7 Jan 2010 05:39:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 07 00:39:08 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NSl5P-0002oI-Vz
	for submit <at> debbugs.gnu.org; Thu, 07 Jan 2010 00:39:08 -0500
Received: from madara.hpl.hp.com ([192.6.19.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1NSl5M-0002nv-5Y
	for 5042@HIDDEN; Thu, 07 Jan 2010 00:39:06 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by madara.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	o075cqXp000982
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Wed, 6 Jan 2010 21:38:53 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	o075cpux020583; Wed, 6 Jan 2010 21:38:51 -0800
Date: Wed, 6 Jan 2010 21:38:51 -0800
Message-Id: <201001070538.o075cpux020583@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: markus.triska@HIDDEN
In-reply-to: <f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	(message from Juanma Barranquero on Mon, 21 Dec 2009 11:37:52 +0100)
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: -4.3 (----)
X-Debbugs-Envelope-To: 5042
Cc: lekktu@HIDDEN, 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.5 (----)


Markus?  We appear to be waiting on your opinion.
- Mark


>  On Mon, Dec 21, 2009 at 07:59, Mark Lillibridge <mark.lillibridge@HIDDEN> wrote:
>  
>  >    I think that given that Mark's mode is likely to be useful enough of
>  > the time and that implementing it is nontrivial, especially for
>  > beginners, there should be an explicit option to switch between the
>  > modes.  The default should probably depend on which surprise people
>  > think is worse.  I can live with either way.
>  
>  I agree, and don't really  care which one is default; I don't mind
>  having to customize it on .emacs (I already do).
>  
>  > I am willing to take a
>  > stab at trying to implement such an option if people think this is a
>  > good idea.
>  
>  Perhaps it'd be better to ask Markus first. I'm Cc:ing him (the first
>  time it didn't work).
>  
>      Juanma
>  





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Dec 2009 02:11:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 30 21:11:53 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NQAW0-0001Ou-Te
	for submit <at> debbugs.gnu.org; Wed, 30 Dec 2009 21:11:53 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1NPW6y-00047X-Gf
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2009 02:03:21 -0500
Received: from mail.gnu.org ([199.232.76.166]:48167 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.69)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1NPW6v-0005wn-Gh
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2009 02:03:17 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
	id 1NPW6t-0000zG-6o
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2009 02:03:16 -0500
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,
	UNPARSEABLE_RELAY autolearn=ham version=3.1.0
Received: from lists.gnu.org ([199.232.76.165]:57308)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1NPW6s-0000yz-3o
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2009 02:03:14 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NPW6s-0006ZD-2q
	for bug-gnu-emacs@HIDDEN; Tue, 29 Dec 2009 02:03:14 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1NPW6m-0006Wo-At
	for bug-gnu-emacs@HIDDEN; Tue, 29 Dec 2009 02:03:12 -0500
Received: from [199.232.76.173] (port=54784 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NPW6l-0006Wf-Ub
	for bug-gnu-emacs@HIDDEN; Tue, 29 Dec 2009 02:03:07 -0500
Received: from lo.gmane.org ([80.91.229.12]:44021)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
	id 1NPW6l-0000xz-Bs
	for bug-gnu-emacs@HIDDEN; Tue, 29 Dec 2009 02:03:07 -0500
Received: from list by lo.gmane.org with local (Exim 4.50) id 1NPW6h-0002EG-9h
	for bug-gnu-emacs@HIDDEN; Tue, 29 Dec 2009 08:03:03 +0100
Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <bug-gnu-emacs@HIDDEN>; Tue, 29 Dec 2009 08:03:03 +0100
Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with
	local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <bug-gnu-emacs@HIDDEN>; Tue, 29 Dec 2009 08:03:03 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Kevin Rodgers <kevin.d.rodgers@HIDDEN>
Subject: Re: bug#5042: 23.1;   linum-mode gives incorrect line numbers with
	narrowed buffers
Date: Tue, 29 Dec 2009 00:02:40 -0700
Lines: 20
Message-ID: <hhc9if$g3h$2@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN>	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>	<200912100534.nBA5YSva008256@HIDDEN>	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>	<200912210659.nBL6xhDG020940@HIDDEN>	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>	<E20A57F51CC148D99B645204828E8F8C@HIDDEN>
	<jwviqbx11fw.fsf-monnier+emacsbugreports@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
In-Reply-To: <jwviqbx11fw.fsf-monnier+emacsbugreports@HIDDEN>
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -5.9 (-----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 30 Dec 2009 21:11:21 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.9 (-----)

Stefan Monnier wrote:
>>>> there should be an explicit option to switch between the modes.
>>> I agree, and don't really  care which one is default
>> Yes, an option makes sense.
>> And it can happen that the same person wants both behaviors at
>> different times.
> 
> Indeed.  This goes back to the ambiguity of `narrow-to-region', which
> can be used either to "pretend the rest of the buffer doesn't exist" (as
> was used in Rmail for example), or to "temporarily focus on some
> particular part of the buffer without pretending the rest doesn't
> exist".

Should there be a separate function for "temporarily focus on some
particular part of the buffer without pretending the rest doesn't
exist"?  e.g. narrow-window-to-region

-- 
Kevin Rodgers
Denver, Colorado, USA






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 24 Dec 2009 03:57:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 22:57:59 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NNepr-0005Mm-8Y
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2009 22:57:59 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1NNelD-0005Kw-Vg
	for 5042 <at> debbugs.gnu.org; Wed, 23 Dec 2009 22:53:12 -0500
Received: from alfajor.home (faina.iro.umontreal.ca [132.204.26.177])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nBO3r3vD029775; 
	Wed, 23 Dec 2009 22:53:05 -0500
Received: by alfajor.home (Postfix, from userid 20848)
	id 945616435B; Wed, 23 Dec 2009 22:49:53 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: "Drew Adams" <drew.adams@HIDDEN>
Subject: Re: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
Message-ID: <jwviqbx11fw.fsf-monnier+emacsbugreports@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<E20A57F51CC148D99B645204828E8F8C@HIDDEN>
Date: Wed, 23 Dec 2009 22:49:53 -0500
In-Reply-To: <E20A57F51CC148D99B645204828E8F8C@HIDDEN> (Drew Adams's
	message of "Mon, 21 Dec 2009 07:50:52 -0800")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3434=0
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5042
X-Mailman-Approved-At: Wed, 23 Dec 2009 22:57:57 -0500
Cc: 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.3 (/)

>> > there should be an explicit option to switch between the modes.
>> I agree, and don't really  care which one is default
> Yes, an option makes sense.
> And it can happen that the same person wants both behaviors at
> different times.

Indeed.  This goes back to the ambiguity of `narrow-to-region', which
can be used either to "pretend the rest of the buffer doesn't exist" (as
was used in Rmail for example), or to "temporarily focus on some
particular part of the buffer without pretending the rest doesn't
exist".


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Dec 2009 21:45:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 16:45:05 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NNZ0z-0002cU-7r
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2009 16:45:05 -0500
Received: from madara.hpl.hp.com ([192.6.19.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>)
	id 1NNZ0k-0002bk-Ew; Wed, 23 Dec 2009 16:44:51 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by madara.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	nBNLiY4q019369
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Wed, 23 Dec 2009 13:44:34 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	nBNLiVHv026499; Wed, 23 Dec 2009 13:44:32 -0800
Date: Wed, 23 Dec 2009 13:44:31 -0800
Message-Id: <200912232144.nBNLiVHv026499@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: drew.adams@HIDDEN
In-reply-to: <36E5CB5C587B4E33B6A9F0A213862385@HIDDEN> (message from
	Drew Adams on Wed, 23 Dec 2009 13:01:10 -0800)
Subject: Re: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<E20A57F51CC148D99B645204828E8F8C@HIDDEN>
	<200912232049.nBNKnLKS025189@HIDDEN>
	<36E5CB5C587B4E33B6A9F0A213862385@HIDDEN>
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, lekktu@HIDDEN, markus.triska@HIDDEN,
	5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)


Drew wrote:
>  Mark wrote:
>  > That might be a good idea.  Would an absolute override be better
>  > than a toggle?  E.g., a positive prefix uses absolute and a negative
>  > prefix uses relative to start of restriction.
>  
>  I don't think so. Given the option's value, there already is a
>  default behavior, which makes one of your cases unnecessary. IOW,
>  there is no override for one of the two possibilities - the default
>  behavior already corresponds to the
>  requested one.
>  
>  If a given user prefers, in general, to use absolute numbering or
>  relative numbering, then s?he would set the option to reflect
>  that. Then s?he need only use `C-u' for the minority of times when
>  s?he wants the alternative behavior.
>  
>  FWIW, I do this kind of thing in some of my own code. Given the
>  ability to customize the default behavior, I see no reason for also
>  being able to specify the _default_ behavior explicitly via a
>  particular prefix arg.
>  
>  If, on the other hand, you were anticipating non-interactive use,
>  then I'd say that in that case all that's needed is to let-bind the
>  variable (option) to give it the value you want currently.

Ok.  

- Mark





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Dec 2009 21:45:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 16:45:05 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NNZ0m-0002bu-UI
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2009 16:45:05 -0500
Received: from madara.hpl.hp.com ([192.6.19.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>)
	id 1NNZ0k-0002bk-Ew; Wed, 23 Dec 2009 16:44:51 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by madara.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	nBNLiY4q019369
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Wed, 23 Dec 2009 13:44:34 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	nBNLiVHv026499; Wed, 23 Dec 2009 13:44:32 -0800
Date: Wed, 23 Dec 2009 13:44:31 -0800
Message-Id: <200912232144.nBNLiVHv026499@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: drew.adams@HIDDEN
In-reply-to: <36E5CB5C587B4E33B6A9F0A213862385@HIDDEN> (message from
	Drew Adams on Wed, 23 Dec 2009 13:01:10 -0800)
Subject: Re: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<E20A57F51CC148D99B645204828E8F8C@HIDDEN>
	<200912232049.nBNKnLKS025189@HIDDEN>
	<36E5CB5C587B4E33B6A9F0A213862385@HIDDEN>
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, lekktu@HIDDEN, markus.triska@HIDDEN,
	5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.5 (--)


Drew wrote:
>  Mark wrote:
>  > That might be a good idea.  Would an absolute override be better
>  > than a toggle?  E.g., a positive prefix uses absolute and a negative
>  > prefix uses relative to start of restriction.
>  
>  I don't think so. Given the option's value, there already is a
>  default behavior, which makes one of your cases unnecessary. IOW,
>  there is no override for one of the two possibilities - the default
>  behavior already corresponds to the
>  requested one.
>  
>  If a given user prefers, in general, to use absolute numbering or
>  relative numbering, then s?he would set the option to reflect
>  that. Then s?he need only use `C-u' for the minority of times when
>  s?he wants the alternative behavior.
>  
>  FWIW, I do this kind of thing in some of my own code. Given the
>  ability to customize the default behavior, I see no reason for also
>  being able to specify the _default_ behavior explicitly via a
>  particular prefix arg.
>  
>  If, on the other hand, you were anticipating non-interactive use,
>  then I'd say that in that case all that's needed is to let-bind the
>  variable (option) to give it the value you want currently.

Ok.  

- Mark





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Dec 2009 21:01:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 16:01:26 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NNYKk-0002C0-Hu
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2009 16:01:26 -0500
Received: from rcsinet12.oracle.com ([148.87.113.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>)
	id 1NNYKg-0002Bo-KB; Wed, 23 Dec 2009 16:01:24 -0500
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by rcsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id
	nBNL1DFx028619
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 23 Dec 2009 21:01:15 GMT
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id
	nBNKx8nH014540; Wed, 23 Dec 2009 21:01:12 GMT
Received: from abhmt013.oracle.com by acsmt353.oracle.com
	with ESMTP id 1209838221261602071; Wed, 23 Dec 2009 13:01:11 -0800
Received: from dradamslap1 (/141.144.169.90)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Wed, 23 Dec 2009 13:01:11 -0800
From: "Drew Adams" <drew.adams@HIDDEN>
To: <mark.lillibridge@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<E20A57F51CC148D99B645204828E8F8C@HIDDEN>
	<200912232049.nBNKnLKS025189@HIDDEN>
Subject: RE: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
Date: Wed, 23 Dec 2009 13:01:10 -0800
Message-ID: <36E5CB5C587B4E33B6A9F0A213862385@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <200912232049.nBNKnLKS025189@HIDDEN>
Thread-Index: AcqEEXjUAdW1k//RSRCmKMGRVNTUuwAAMqKw
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4B328519.0153:SCFMA4539814,ss=1,fgs=0
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, lekktu@HIDDEN, markus.triska@HIDDEN,
	5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.0 (----)

> Drew wrote:
> >  > > there should be an explicit option to switch between the modes.
> >  
> >  Yes, an option makes sense.
> >  
> >  And it can happen that the same person wants both behaviors at
> >  different times.  For that, why not let `C-u linum-mode' use, in
> >  effect, the opposite of the option value?
> 
> That might be a good idea.  Would an absolute override be better
> than a toggle?  E.g., a positive prefix uses absolute and a negative
> prefix uses relative to start of restriction.

I don't think so. Given the option's value, there already is a default behavior,
which makes one of your cases unnecessary. IOW, there is no override for one of
the two possibilities - the default behavior already corresponds to the
requested one.

If a given user prefers, in general, to use absolute numbering or relative
numbering, then s?he would set the option to reflect that. Then s?he need only
use `C-u' for the minority of times when s?he wants the alternative behavior.

FWIW, I do this kind of thing in some of my own code. Given the ability to
customize the default behavior, I see no reason for also being able to specify
the _default_ behavior explicitly via a particular prefix arg.

If, on the other hand, you were anticipating non-interactive use, then I'd say
that in that case all that's needed is to let-bind the variable (option) to give
it the value you want currently.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Dec 2009 21:01:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 16:01:26 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NNYKk-0002By-4a
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2009 16:01:26 -0500
Received: from rcsinet12.oracle.com ([148.87.113.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>)
	id 1NNYKg-0002Bo-KB; Wed, 23 Dec 2009 16:01:24 -0500
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by rcsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id
	nBNL1DFx028619
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 23 Dec 2009 21:01:15 GMT
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id
	nBNKx8nH014540; Wed, 23 Dec 2009 21:01:12 GMT
Received: from abhmt013.oracle.com by acsmt353.oracle.com
	with ESMTP id 1209838221261602071; Wed, 23 Dec 2009 13:01:11 -0800
Received: from dradamslap1 (/141.144.169.90)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Wed, 23 Dec 2009 13:01:11 -0800
From: "Drew Adams" <drew.adams@HIDDEN>
To: <mark.lillibridge@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<E20A57F51CC148D99B645204828E8F8C@HIDDEN>
	<200912232049.nBNKnLKS025189@HIDDEN>
Subject: RE: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
Date: Wed, 23 Dec 2009 13:01:10 -0800
Message-ID: <36E5CB5C587B4E33B6A9F0A213862385@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <200912232049.nBNKnLKS025189@HIDDEN>
Thread-Index: AcqEEXjUAdW1k//RSRCmKMGRVNTUuwAAMqKw
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4B328519.0153:SCFMA4539814,ss=1,fgs=0
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, lekktu@HIDDEN, markus.triska@HIDDEN,
	5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.0 (----)

> Drew wrote:
> >  > > there should be an explicit option to switch between the modes.
> >  
> >  Yes, an option makes sense.
> >  
> >  And it can happen that the same person wants both behaviors at
> >  different times.  For that, why not let `C-u linum-mode' use, in
> >  effect, the opposite of the option value?
> 
> That might be a good idea.  Would an absolute override be better
> than a toggle?  E.g., a positive prefix uses absolute and a negative
> prefix uses relative to start of restriction.

I don't think so. Given the option's value, there already is a default behavior,
which makes one of your cases unnecessary. IOW, there is no override for one of
the two possibilities - the default behavior already corresponds to the
requested one.

If a given user prefers, in general, to use absolute numbering or relative
numbering, then s?he would set the option to reflect that. Then s?he need only
use `C-u' for the minority of times when s?he wants the alternative behavior.

FWIW, I do this kind of thing in some of my own code. Given the ability to
customize the default behavior, I see no reason for also being able to specify
the _default_ behavior explicitly via a particular prefix arg.

If, on the other hand, you were anticipating non-interactive use, then I'd say
that in that case all that's needed is to let-bind the variable (option) to give
it the value you want currently.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Dec 2009 20:49:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 15:49:39 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NNY9L-00025I-1L
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2009 15:49:39 -0500
Received: from gundega.hpl.hp.com ([192.6.19.190])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>)
	id 1NNY9I-000257-Cn; Wed, 23 Dec 2009 15:49:37 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by gundega.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	nBNKnOvH019089
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Wed, 23 Dec 2009 12:49:24 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	nBNKnLKS025189; Wed, 23 Dec 2009 12:49:21 -0800
Date: Wed, 23 Dec 2009 12:49:21 -0800
Message-Id: <200912232049.nBNKnLKS025189@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: drew.adams@HIDDEN
In-reply-to: <E20A57F51CC148D99B645204828E8F8C@HIDDEN> (message from
	Drew Adams on Mon, 21 Dec 2009 07:50:52 -0800)
Subject: Re: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<E20A57F51CC148D99B645204828E8F8C@HIDDEN>
X-MailScanner-ID: nBNKnOvH019089
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, lekktu@HIDDEN, markus.triska@HIDDEN,
	5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.0 (/)


Juanma wrote:
> Mark Lillibridge wrote:
> > I am willing to take a stab at trying to implement such an option if
> > people think this is a good idea.
> 
> Perhaps it'd be better to ask Markus first. I'm Cc:ing him (the first
> time it didn't work).

Ok.


Drew wrote:
>  > > there should be an explicit option to switch between the modes.
>  
>  Yes, an option makes sense.
>  
>  And it can happen that the same person wants both behaviors at
>  different times.  For that, why not let `C-u linum-mode' use, in
>  effect, the opposite of the option value?

    That might be a good idea.  Would an absolute override be better
than a toggle?  E.g., a positive prefix uses absolute and a negative
prefix uses relative to start of restriction.

- Mark






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 23 Dec 2009 20:49:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 15:49:39 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NNY9K-00025F-RR
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2009 15:49:38 -0500
Received: from gundega.hpl.hp.com ([192.6.19.190])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>)
	id 1NNY9I-000257-Cn; Wed, 23 Dec 2009 15:49:37 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by gundega.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	nBNKnOvH019089
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Wed, 23 Dec 2009 12:49:24 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	nBNKnLKS025189; Wed, 23 Dec 2009 12:49:21 -0800
Date: Wed, 23 Dec 2009 12:49:21 -0800
Message-Id: <200912232049.nBNKnLKS025189@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: drew.adams@HIDDEN
In-reply-to: <E20A57F51CC148D99B645204828E8F8C@HIDDEN> (message from
	Drew Adams on Mon, 21 Dec 2009 07:50:52 -0800)
Subject: Re: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
	<E20A57F51CC148D99B645204828E8F8C@HIDDEN>
X-MailScanner-ID: nBNKnOvH019089
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, lekktu@HIDDEN, markus.triska@HIDDEN,
	5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.0 (/)


Juanma wrote:
> Mark Lillibridge wrote:
> > I am willing to take a stab at trying to implement such an option if
> > people think this is a good idea.
> 
> Perhaps it'd be better to ask Markus first. I'm Cc:ing him (the first
> time it didn't work).

Ok.


Drew wrote:
>  > > there should be an explicit option to switch between the modes.
>  
>  Yes, an option makes sense.
>  
>  And it can happen that the same person wants both behaviors at
>  different times.  For that, why not let `C-u linum-mode' use, in
>  effect, the opposite of the option value?

    That might be a good idea.  Would an absolute override be better
than a toggle?  E.g., a positive prefix uses absolute and a negative
prefix uses relative to start of restriction.

- Mark






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 21 Dec 2009 15:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 21 10:52:03 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NMkYF-0008Lt-Il
	for submit <at> debbugs.gnu.org; Mon, 21 Dec 2009 10:52:03 -0500
Received: from acsinet12.oracle.com ([141.146.126.234])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>)
	id 1NMkYB-0008LS-D2; Mon, 21 Dec 2009 10:52:01 -0500
Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id
	nBLFpa4l007785
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 21 Dec 2009 15:51:37 GMT
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id
	nBLFnYt7010870; Mon, 21 Dec 2009 15:51:56 GMT
Received: from abhmt010.oracle.com by acsmt358.oracle.com
	with ESMTP id 1152921031261410704; Mon, 21 Dec 2009 09:51:44 -0600
Received: from dradamslap1 (/24.5.185.59)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Mon, 21 Dec 2009 07:51:22 -0800
From: "Drew Adams" <drew.adams@HIDDEN>
To: "'Juanma Barranquero'" <lekktu@HIDDEN>, <5042 <at> debbugs.gnu.org>,
	<mark.lillibridge@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
Subject: RE: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
Date: Mon, 21 Dec 2009 07:50:52 -0800
Message-ID: <E20A57F51CC148D99B645204828E8F8C@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Thread-Index: AcqCKgi4Pl5jmNNzTfe+53wukUpJ7wAKqNfA
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090207.4B2F9996.0039:SCFMA4539814,ss=1,fgs=0
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 'Markus Triska' <markus.triska@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org

> > there should be an explicit option to switch between the modes.
> I agree, and don't really  care which one is default

Yes, an option makes sense.

And it can happen that the same person wants both behaviors at different times.
For that, why not let `C-u linum-mode' use, in effect, the opposite of the
option value?

IOW, if you set the option to use absolute numbering (per the file lines), and
you use `C-u linum-mode', then you get relative numbering instead (per the
visible lines). If you then exit the mode and reenter it (without `C-u'), you
get the default numbering (i.e., per the option value - absolute numbering in
this case).





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 21 Dec 2009 15:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 21 10:52:03 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NMkYF-0008Lv-P6
	for submit <at> debbugs.gnu.org; Mon, 21 Dec 2009 10:52:03 -0500
Received: from acsinet12.oracle.com ([141.146.126.234])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>)
	id 1NMkYB-0008LS-D2; Mon, 21 Dec 2009 10:52:01 -0500
Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id
	nBLFpa4l007785
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 21 Dec 2009 15:51:37 GMT
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id
	nBLFnYt7010870; Mon, 21 Dec 2009 15:51:56 GMT
Received: from abhmt010.oracle.com by acsmt358.oracle.com
	with ESMTP id 1152921031261410704; Mon, 21 Dec 2009 09:51:44 -0600
Received: from dradamslap1 (/24.5.185.59)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Mon, 21 Dec 2009 07:51:22 -0800
From: "Drew Adams" <drew.adams@HIDDEN>
To: "'Juanma Barranquero'" <lekktu@HIDDEN>, <5042 <at> debbugs.gnu.org>,
	<mark.lillibridge@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN>
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	<200912100534.nBA5YSva008256@HIDDEN><f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	<200912210659.nBL6xhDG020940@HIDDEN>
	<f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
Subject: RE: bug#5042: 23.1;
	linum-mode gives incorrect line numbers with  narrowed buffers
Date: Mon, 21 Dec 2009 07:50:52 -0800
Message-ID: <E20A57F51CC148D99B645204828E8F8C@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Thread-Index: AcqCKgi4Pl5jmNNzTfe+53wukUpJ7wAKqNfA
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090207.4B2F9996.0039:SCFMA4539814,ss=1,fgs=0
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, 'Markus Triska' <markus.triska@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org

> > there should be an explicit option to switch between the modes.
> I agree, and don't really  care which one is default

Yes, an option makes sense.

And it can happen that the same person wants both behaviors at different times.
For that, why not let `C-u linum-mode' use, in effect, the opposite of the
option value?

IOW, if you set the option to use absolute numbering (per the file lines), and
you use `C-u linum-mode', then you get relative numbering instead (per the
visible lines). If you then exit the mode and reenter it (without `C-u'), you
get the default numbering (i.e., per the option value - absolute numbering in
this case).





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 21 Dec 2009 10:38:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 21 05:38:17 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NMfeb-0005sE-75
	for submit <at> debbugs.gnu.org; Mon, 21 Dec 2009 05:38:17 -0500
Received: from mail-bw0-f227.google.com ([209.85.218.227])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lekktu@HIDDEN>) id 1NMfeZ-0005s9-IT
	for 5042@HIDDEN; Mon, 21 Dec 2009 05:38:15 -0500
Received: by bwz27 with SMTP id 27so3294928bwz.1
	for <5042@HIDDEN>;
	Mon, 21 Dec 2009 02:38:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=TZ11KKAOrI9BIJ11EpApcwHHTXWlASDpyM+FBXR9V2M=;
	b=HX0v9vp5+2JuxbqZOJrtsfSTcwev4YpVRa3HcvfOvdSvRE2w64CpMXYoOS93YTCFuA
	vuxIPAA3f0JdIPIx+q8/o+VSh6/0JRNIVlMb1pj7TITcWTLvbdhBr66N0pmo7IGlq4kt
	ZPtIy6yDjvKSb4LlFV3HejhQFKuVi71trwF14=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=FAZtFX57bjIEX8G9IE7bfuxNP4YF1+s6iVEPabEuLhhWvGfIiwjUK4g7XBJcNHrWHa
	ZofU5oj/xVOUP1N/6qOG1xeepQTrFvJmr/mNBZqkSHWrpvFMviicJa30hqfpxr3EayZ4
	XGD1IvKBQXnPqIkMeXaqJ5w7UmyL9yxGw3Mzc=
MIME-Version: 1.0
Received: by 10.204.148.69 with SMTP id o5mr485588bkv.99.1261391892124; Mon, 
	21 Dec 2009 02:38:12 -0800 (PST)
In-Reply-To: <200912210659.nBL6xhDG020940@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN> 
	<200912210659.nBL6xhDG020940@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Mon, 21 Dec 2009 11:37:52 +0100
Message-ID: <f7ccd24b0912210237o686ef31bjab0f8859606dc0bb@HIDDEN>
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
To: mark.lillibridge@HIDDEN
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Debbugs-Envelope-To: 5042
Cc: 5042 <at> debbugs.gnu.org, Markus Triska <markus.triska@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org

On Mon, Dec 21, 2009 at 07:59, Mark Lillibridge <mark.lillibridge@HIDDEN> w=
rote:

> =C2=A0 =C2=A0I think that given that Mark's mode is likely to be useful e=
nough of
> the time and that implementing it is nontrivial, especially for
> beginners, there should be an explicit option to switch between the
> modes. =C2=A0The default should probably depend on which surprise people
> think is worse. =C2=A0I can live with either way.

I agree, and don't really  care which one is default; I don't mind
having to customize it on .emacs (I already do).

> I am willing to take a
> stab at trying to implement such an option if people think this is a
> good idea.

Perhaps it'd be better to ask Markus first. I'm Cc:ing him (the first
time it didn't work).

    Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042 <at> debbugs.gnu.org:


Received: (at 5042) by debbugs.gnu.org; 21 Dec 2009 07:05:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 21 02:05:27 2009
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NMcKc-0004bQ-Sy
	for submit <at> debbugs.gnu.org; Mon, 21 Dec 2009 02:05:27 -0500
Received: from madara.hpl.hp.com ([192.6.19.124])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <mark.lillibridge@HIDDEN>) id 1NMcFJ-0004Yn-D9
	for 5042@HIDDEN; Mon, 21 Dec 2009 01:59:58 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by madara.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id
	nBL6xjR7013296
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Sun, 20 Dec 2009 22:59:45 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id
	nBL6xhDG020940; Sun, 20 Dec 2009 22:59:43 -0800
Date: Sun, 20 Dec 2009 22:59:43 -0800
Message-Id: <200912210659.nBL6xhDG020940@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: lekktu@HIDDEN
In-reply-to: <f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
	(message from Juanma Barranquero on Thu, 10 Dec 2009 12:41:21 +0100)
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
	<f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-Spam-Status: No
X-Debbugs-Envelope-To: 5042
X-Mailman-Approved-At: Mon, 21 Dec 2009 02:05:25 -0500
Cc: 5042 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: mark.lillibridge@HIDDEN
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org


Okay, let us see where we stand:

* Juanma uses linum mode to know how many lines there are in a file (or
  a region, if narrowing is in effect) at a glance; they do not use go
  to line.

* Mark (aka, me) and others specify lines to act on by reading off line
  numbers provided by linum and use goto-line to implement voice
  commands; it is crucial for this purpose that the line numbers
  provided correspond to the line numbers goto-line uses in all cases,
  including for non-current buffers.

* linum mode currently does what Juanma wants.

* A somewhat non-obvious and fragile hook function can convert the
  current mode into what Mark wants:

(add-hook 'linum-before-numbering-hook
	   (function (lambda ()
		       (setq line (save-restriction
				    (widen) (line-number-at-pos))))))
  
  (line here is a local variable of the linum-update-window, bound
  shortly before the hook is called; needless to say, this modification
  is unlikely to continue working as the linum code evolves.)

* I think you can build a less fragile hook by using a custom version of
  linum-format, however, this interferes with the ability to use
  linum-format for any other purpose.

* Both modes produce surprises: Juanma's causes surprises when goto-line
  goes to the wrong line in some buffers and Mark's causes surprises
  when some buffers start with a line number greater than one.  Using
  Juanma's mode plus changing the behavior of goto-line would produce no
  obvious surprises, but I cannot be sure that changing goto-line
  does not mess something else up.


    I think that given that Mark's mode is likely to be useful enough of
the time and that implementing it is nontrivial, especially for
beginners, there should be an explicit option to switch between the
modes.  The default should probably depend on which surprise people
think is worse.  I can live with either way.  I am willing to take a
stab at trying to implement such an option if people think this is a
good idea.

- Mark





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5042; Package emacs. Full text available.

Message received at 5042@HIDDEN:


Received: (at 5042) by emacsbugs.donarmstrong.com; 10 Dec 2009 11:41:49 +0000
From lekktu@HIDDEN Thu Dec 10 03:41:49 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,FVGT_m_MULTI_ODD,
	HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mail-fx0-f215.google.com (mail-fx0-f215.google.com [209.85.220.215])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBABflif022334
	for <5042@HIDDEN>; Thu, 10 Dec 2009 03:41:48 -0800
Received: by fxm7 with SMTP id 7so7638382fxm.9
        for <5042@HIDDEN>; Thu, 10 Dec 2009 03:41:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :from:date:message-id:subject:to:cc:content-type
         :content-transfer-encoding;
        bh=3O3R9Hk/kNJ/DpP8z+rL/C04N0JGSpdB1yIYfQWONdM=;
        b=W+H0lxT6re8AO8iLFnnJO10Q4bizp+5CRh4cFh7FO6x+xiLlmR1kYcWM9jR+qF5mQn
         WoQNIOvt23K2MndtUznaJGBltR1WK6ZvPTJbgHqSFiGPP0ic9xTOhxM+9bIP41uIhC6h
         22vEZ5xjqg9Ksk3prVHVcAUgSyevjn95l8axc=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:content-type:content-transfer-encoding;
        b=MfyLuxvDWgLAKzqlA7vvpJF+oC8VT+mHHAMl9d059Avu2Cd0YaEttwTsyPE6MaOhBn
         tWO90oHcP3UNYBqSzjyjlHl2eoE140Rg3MQJRP551Da6Efj3yI/GNPzJA8hZPEiDMylg
         ZTgz4MdClOTpG6o+biJBQQP4wcMBRUpGYX0wg=
MIME-Version: 1.0
Received: by 10.239.168.195 with SMTP id l3mr1165416hbe.27.1260445301108; Thu, 
	10 Dec 2009 03:41:41 -0800 (PST)
In-Reply-To: <200912100534.nBA5YSva008256@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN> 
	<f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN> 
	<200912100534.nBA5YSva008256@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Thu, 10 Dec 2009 12:41:21 +0100
Message-ID: <f7ccd24b0912100341q62e2259as90a1a26bbda73739@HIDDEN>
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
To: mark.lillibridge@HIDDEN
Cc: 5042 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Thu, Dec 10, 2009 at 06:34, Mark Lillibridge <mark.lillibridge@HIDDEN> w=
rote:

> =C2=A0 =C2=A0The entire point of having line numbers is that they corresp=
ond to
> something useful. Either an external program's line number (e.g., a gcc
> error number) or an internal Emacs notion such as that provided by
> goto-line. =C2=A0The current behavior does neither.

Well, there are many definitions of useful. I find the current
behavior useful, because my main use of linum is knowing at a glance
how many lines there are in the file (or in the region, if narrowing
is in effect).

> =C2=A0 =C2=A0Note that other line numbering modes like wb-line-number imp=
lement
> the behavior that I describe as correct.

Yes. But linum allows you to use line numbers in a quite more flexible
way. You could do

(defvar num-of-lines nil)
(defvar num-format nil)
(make-variable-buffer-local 'num-of-lines)
(make-variable-buffer-local 'num-format)

(add-hook 'linum-before-numbering-hook
          (lambda ()
            (save-restriction
              (widen)
              (let ((lines (count-lines (point-min) (point-max))))
                (setq num-format (format "%%%dd" (length
(int-to-string lines))))
                (setq num-of-lines (1+ lines))))))

(setq linum-format
      (lambda (line)
        (format num-format (- num-of-lines line))))

if you fancied numbering lines in reverse, for example.

    Juanma



Acknowledgement sent to Juanma Barranquero <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#5042; Package emacs. Full text available.

Message received at 5042@HIDDEN:


Received: (at 5042) by emacsbugs.donarmstrong.com; 10 Dec 2009 05:34:41 +0000
From mark.lillibridge@HIDDEN Wed Dec  9 21:34:41 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-1.8 required=4.0 tests=AWL,FOURLA,FVGT_m_MULTI_ODD,
	HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02
Received: from madara.hpl.hp.com (madara.hpl.hp.com [192.6.19.124])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBA5YdNx015132;
	Wed, 9 Dec 2009 21:34:41 -0800
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by madara.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id nBA5YU0o013689
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Wed, 9 Dec 2009 21:34:30 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id nBA5YSva008256;
	Wed, 9 Dec 2009 21:34:28 -0800
Date: Wed, 9 Dec 2009 21:34:28 -0800
Message-Id: <200912100534.nBA5YSva008256@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: lekktu@HIDDEN
CC: 5042 <at> debbugs.gnu.org, control <at> debbugs.gnu.org
In-reply-to: <f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
	(message from Juanma Barranquero on Tue, 1 Dec 2009 01:32:26 +0100)
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
Reply-to: mark.lillibridge@HIDDEN
References: <200911260039.nAQ0dTD1019384@HIDDEN> <f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN


>  On Thu, Nov 26, 2009 at 01:39, Mark Lillibridge <mark.lillibridge@HIDDEN> wrote:
>  
>  >    Linum-mode does not work correctly with buffers that have been
>  > narrowed.  As a simple example, type ^h i.  You will note that the first
>  > line is assigned line number one.  You can verify that this is wrong
>  > either by using goto-line
>  
>  Let's hear Markus' opinion, but IMHO that's not necessarily a bug.
>  Linum's function is to add line numbers, but these do not have to
>  correspond to buffer lines. For example, nothing stops you from doing
>  
>    (defvar my-num 1000)
>    (make-variable-buffer-local 'my-num)
>  
>    (setq linum-format (lambda (n) (format "%4d" (+ n my-num))))
>  
>  
>      Juanma

    The entire point of having line numbers is that they correspond to
something useful.  Either an external program's line number (e.g., a gcc
error number) or an internal Emacs notion such as that provided by
goto-line.  The current behavior does neither.

    Note that other line numbering modes like wb-line-number implement
the behavior that I describe as correct.

    I cannot see any useful circumstance where linum and goto-line
should disagree about what line number a given line has.  I can see an
argument that some buffers like RMAIL and info might want to start
numbering lines at one for the visible part of the buffer; I see this as
a possible feature request where say a buffer local variable specifies
this behavior.

    Note that that feature might be hard to implement correctly because
there is no hook for changing the buffer restriction visible to the
user.  That is, even if you believe that feature should be the
default/only behavior, the current code is still broken because changing
the restriction does not update the line numbers correctly.

- Mark




Acknowledgement sent to mark.lillibridge@HIDDEN:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#5042; Package emacs. Full text available.

Message received at 5042@HIDDEN:


Received: (at 5042) by emacsbugs.donarmstrong.com; 1 Dec 2009 00:32:54 +0000
From lekktu@HIDDEN Mon Nov 30 16:32:54 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,FOURLA,FVGT_m_MULTI_ODD,
	HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mail-fx0-f215.google.com (mail-fx0-f215.google.com [209.85.220.215])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB10Wq4r012740;
	Mon, 30 Nov 2009 16:32:53 -0800
Received: by fxm7 with SMTP id 7so4602075fxm.9
        for <multiple recipients>; Mon, 30 Nov 2009 16:32:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :from:date:message-id:subject:to:cc:content-type
         :content-transfer-encoding;
        bh=+C68tAuQ/PTg4CQ5BQdbSQtOZ7lr+DYNlg616d4+UVA=;
        b=Xn4ux+paPUCJlRsSOzWyjnahxlVQOe35pLkFAGbDxpMNx+w1RbGvFIwWtFTI40RP3B
         QrBDxnpBSPOhVVUNltJttJ/z3cSswOCWfZUTjsHSRQdxLEO9xXCh4F/zD6sErGbQ0oOl
         NbRWpo528fbaDOMrOgTupJHxnK1DDHqbfpYS4=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:content-type:content-transfer-encoding;
        b=RMrzBgD3DEqRqcBaeKKhegvYTBhtAok7wbNG188xNVVqC4Zb2+NGkHjzbQzo1VlXHJ
         vyyub4YJihmYe7pqm6jZa8yGDenyznhg5F4CZQngmHulDtKwESkYyf1wgOuf6mCSbCD6
         WcVpgsFDKdw6osSADtgUQB8r5+2mRYq8r1ucc=
MIME-Version: 1.0
Received: by 10.239.162.129 with SMTP id l1mr501415hbd.206.1259627566299; Mon, 
	30 Nov 2009 16:32:46 -0800 (PST)
In-Reply-To: <200911260039.nAQ0dTD1019384@HIDDEN>
References: <200911260039.nAQ0dTD1019384@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Tue, 1 Dec 2009 01:32:26 +0100
Message-ID: <f7ccd24b0911301632n2418a309va8e70b0f4dceccf9@HIDDEN>
Subject: Re: bug#5042: 23.1; linum-mode gives incorrect line numbers with 
	narrowed buffers
To: mark.lillibridge@HIDDEN
Cc: 5042 <at> debbugs.gnu.org, control <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

X-Debbugs-CC: markus.triska@HIDDEN
quit

On Thu, Nov 26, 2009 at 01:39, Mark Lillibridge <mark.lillibridge@HIDDEN> w=
rote:

> =C2=A0 =C2=A0Linum-mode does not work correctly with buffers that have be=
en
> narrowed. =C2=A0As a simple example, type ^h i. =C2=A0You will note that =
the first
> line is assigned line number one. =C2=A0You can verify that this is wrong
> either by using goto-line

Let's hear Markus' opinion, but IMHO that's not necessarily a bug.
Linum's function is to add line numbers, but these do not have to
correspond to buffer lines. For example, nothing stops you from doing

  (defvar my-num 1000)
  (make-variable-buffer-local 'my-num)

  (setq linum-format (lambda (n) (format "%4d" (+ n my-num))))


    Juanma



Acknowledgement sent to Juanma Barranquero <lekktu@HIDDEN>:
Extra info received and forwarded to list. Copy sent to markus.triska@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, markus.triska@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#5042; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2009 00:39:49 +0000
From mark.lillibridge@HIDDEN Wed Nov 25 16:39:49 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-0.3 required=4.0 tests=AWL autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAQ0dlQ2019543
	for <submit@HIDDEN>; Wed, 25 Nov 2009 16:39:48 -0800
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NDSOh-0002ft-7W
	for bug-gnu-emacs@HIDDEN; Wed, 25 Nov 2009 19:39:47 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1NDSOc-0002Ya-C7
	for bug-gnu-emacs@HIDDEN; Wed, 25 Nov 2009 19:39:46 -0500
Received: from [199.232.76.173] (port=60207 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1NDSOc-0002YG-2V
	for bug-gnu-emacs@HIDDEN; Wed, 25 Nov 2009 19:39:42 -0500
Received: from gundega.hpl.hp.com ([192.6.19.190]:54758)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <mark.lillibridge@HIDDEN>)
	id 1NDSOb-0004lg-CA
	for bug-gnu-emacs@HIDDEN; Wed, 25 Nov 2009 19:39:41 -0500
Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25])
	by gundega.hpl.hp.com (8.14.3/8.14.1/HPL-PA Relay) with ESMTP id nAQ0dVkb001261
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <bug-gnu-emacs@HIDDEN>; Wed, 25 Nov 2009 16:39:31 -0800 (PST)
Received: from ts-rhel4.hpl.hp.com (ts-rhel4.hpl.hp.com [15.25.118.24])
	by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id nAQ0dTD1019384;
	Wed, 25 Nov 2009 16:39:30 -0800
Date: Wed, 25 Nov 2009 16:39:29 -0800
Message-Id: <200911260039.nAQ0dTD1019384@HIDDEN>
From: Mark Lillibridge <mark.lillibridge@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 23.1; linum-mode gives incorrect line numbers with narrowed buffers
Reply-to: mark.lillibridge@HIDDEN
X-MailScanner-ID: nAQ0dVkb001261
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: mark.lillibridge@HIDDEN
X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized.


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@HIDDEN mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:


    Linum-mode does not work correctly with buffers that have been
narrowed.  As a simple example, type ^h i.  You will note that the first
line is assigned line number one.  You can verify that this is wrong
either by using goto-line (watch what happens when you try to go to line
10) or widen, which reveals that the first line is actually line number
five.

The bug is the use by linum of line-number-at-pos,

linum.el:129:
(defun linum-update-window (win)
  "Update line numbers for the portion visible in window WIN."
  (goto-char (window-start win))
  (let ((line (line-number-at-pos))
  ...

<help for line-number-at-pos>:
line-number-at-pos is a compiled Lisp function in `simple.el'.

(line-number-at-pos &optional pos)

Return (narrowed) buffer line number at position pos.
If pos is nil, use current buffer location.
Counting starts at (point-min), so the value refers
to the contents of the accessible portion of the buffer.


A simple fix is to change the line:

linum.el:132:
  (let ((line (line-number-at-pos))

to:

  (let ((line (save-restriction
		(widen)
		(line-number-at-pos)))


- Mark





Acknowledgement sent to mark.lillibridge@HIDDEN:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#5042; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 31 Oct 2020 20:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.