GNU bug report logs - #9917
24.0.90; Make `goto-line' consistent with the line number from the minibuffer

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: Dani Moncayo <dmoncayo@HIDDEN>; merged with #5042, #16173; Forwarded to http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00143.html; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 5042 9917 16173. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 9917) by debbugs.gnu.org; 2 Nov 2011 13:01:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 02 09:01:45 2011
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 1RLaRs-0007gP-Nf
	for submit <at> debbugs.gnu.org; Wed, 02 Nov 2011 09:01:45 -0400
Received: from acsinet15.oracle.com ([141.146.126.227])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>) id 1RLaRp-0007gG-HA
	for 9917 <at> debbugs.gnu.org; Wed, 02 Nov 2011 09:01:42 -0400
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
	by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id
	pA2CxGVS000744
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 2 Nov 2011 12:59:17 GMT
Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156])
	by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
	pA2CxFVt027682
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 2 Nov 2011 12:59:16 GMT
Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54])
	by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id
	pA2CxAr3030128; Wed, 2 Nov 2011 07:59:10 -0500
Received: from dradamslap1 (/10.159.36.247)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Wed, 02 Nov 2011 05:59:09 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
To: "'Juri Linkov'" <juri@HIDDEN>
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN><87pqhcyzms.fsf@HIDDEN><jwvzkgfg2a8.fsf-monnier+emacs@HIDDEN><87y5vzpirv.fsf@HIDDEN><F60060A50EBA454AA3C82D60BC2AEB18@HIDDEN>
	<8762j2yhwv.fsf@HIDDEN>
Subject: RE: bug#9917: 24.0.90;
	Make `goto-line' consistent with the line number from the minibuffer
Date: Wed, 2 Nov 2011 05:59:11 -0700
Message-ID: <B8AA4EEDAF184F75A4FDC9E19DDDB7F4@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: <8762j2yhwv.fsf@HIDDEN>
Thread-Index: AcyZRVcZuUXZoAVOR4qFcg5ockJoSwAGPKvw
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4EB13EA5.0191,ss=1,re=0.000,fgs=0
X-Spam-Score: -6.2 (------)
X-Debbugs-Envelope-To: 9917
Cc: 9917 <at> debbugs.gnu.org, 'Stefan Monnier' <monnier@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/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: <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.2 (------)

> > For `goto-line':
> >
> > 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.
> 
> A negative line number usually means counting from the end of 
> the buffer.

Dunno what "usually" means here.  It certainly does not mean that for
`goto-line'.  Currently, using a negative prefix arg seems to just move to line
1.

We can define what a negative arg means for `goto-line' to be anything we want.

Consistency is all well and good, especially when there are other, supporting,
good reasons to keep it up.  But it sometimes happens that "usually" gets
"established" more or less by accident/default, no better alternative having
occurred to the designer at the time.

Other suggestions welcome.  I think it would be good to be able to quickly say
whether you want numbering relative to the restriction or the whole buffer.

Of course another possibility is to simply have a separate command for that.
The only reason to use the same command and, say, a prefix arg, would be to save
keys (and user memory).  A separate `goto-line-in-restriction' is a reasonable
solution, IMO.





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

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


Received: (at 9917) by debbugs.gnu.org; 2 Nov 2011 09:56:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 02 05:56:14 2011
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 1RLXYL-0002gZ-QJ
	for submit <at> debbugs.gnu.org; Wed, 02 Nov 2011 05:56:14 -0400
Received: from smarty.dreamhost.com ([208.113.175.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1RLXYJ-0002gS-QG
	for 9917 <at> debbugs.gnu.org; Wed, 02 Nov 2011 05:56:12 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id 5BF926E809A;
	Wed,  2 Nov 2011 02:53:49 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 3FCC7451C577;
	Wed,  2 Nov 2011 02:53:48 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: "Drew Adams" <drew.adams@HIDDEN>
Subject: Re: bug#9917: 24.0.90;
	Make `goto-line' consistent with the line number from the minibuffer
Organization: JURTA
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
	<87pqhcyzms.fsf@HIDDEN>
	<jwvzkgfg2a8.fsf-monnier+emacs@HIDDEN>
	<87y5vzpirv.fsf@HIDDEN>
	<F60060A50EBA454AA3C82D60BC2AEB18@HIDDEN>
Date: Wed, 02 Nov 2011 11:48:00 +0200
In-Reply-To: <F60060A50EBA454AA3C82D60BC2AEB18@HIDDEN> (Drew Adams's
	message of "Tue, 1 Nov 2011 16:22:05 -0700")
Message-ID: <8762j2yhwv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 9917
Cc: 9917 <at> debbugs.gnu.org, 'Stefan Monnier' <monnier@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/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: <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 (--)

> For `goto-line':
>
> 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.

A negative line number usually means counting from the end of the buffer.




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

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


Received: (at 9917) by debbugs.gnu.org; 2 Nov 2011 09:56:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 02 05:56:10 2011
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 1RLXYI-0002gL-IZ
	for submit <at> debbugs.gnu.org; Wed, 02 Nov 2011 05:56:10 -0400
Received: from smarty.dreamhost.com ([208.113.175.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1RLXYH-0002gE-17
	for 9917 <at> debbugs.gnu.org; Wed, 02 Nov 2011 05:56:09 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id 959396E8089;
	Wed,  2 Nov 2011 02:53:46 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id D04FA451C577;
	Wed,  2 Nov 2011 02:53:44 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#9917: 24.0.90;
	Make `goto-line' consistent with the line number from the minibuffer
Organization: JURTA
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
	<87pqhcyzms.fsf@HIDDEN>
	<jwvzkgfg2a8.fsf-monnier+emacs@HIDDEN>
Date: Wed, 02 Nov 2011 11:46:34 +0200
In-Reply-To: <jwvzkgfg2a8.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Tue, 01 Nov 2011 13:56:19 -0400")
Message-ID: <87ipn2yhz9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 9917
Cc: 9917 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@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/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: <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 (--)

> The difference is whether narrow-to-region really wants to pretend the
> text outside the region doesn't exist at all (e.g. in Rmail or Info), or
> whether it is just meant to temporarily only display a subpart
> (e.g. most other cases).

While fixing `Info-revert-find-node' for bug#9915, I noticed the
following comment in `Info-revert-find-node':

	  ;; note goto-line is no good, we want to measure from point-min
	  (goto-char (point-min))
	  (forward-line wline)

This means that `goto-line' should be fixed even for non-interactive use
in Info.




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

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


Received: (at 9917) by debbugs.gnu.org; 1 Nov 2011 23:24:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 01 19:24:37 2011
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 1RLNh6-0005Tf-T4
	for submit <at> debbugs.gnu.org; Tue, 01 Nov 2011 19:24:37 -0400
Received: from rcsinet15.oracle.com ([148.87.113.117])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>) id 1RLNh4-0005TY-IV
	for 9917 <at> debbugs.gnu.org; Tue, 01 Nov 2011 19:24:35 -0400
Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94])
	by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id
	pA1NMDOM020789
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 1 Nov 2011 23:22:14 GMT
Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157])
	by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
	pA1NMC2s005318
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 1 Nov 2011 23:22:12 GMT
Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71])
	by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id
	pA1NM6Ak023000; Tue, 1 Nov 2011 18:22:06 -0500
Received: from dradamslap1 (/10.159.60.177)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Tue, 01 Nov 2011 16:22:06 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
To: "'Juri Linkov'" <juri@HIDDEN>,
	"'Stefan Monnier'" <monnier@HIDDEN>
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN><87pqhcyzms.fsf@HIDDEN><jwvzkgfg2a8.fsf-monnier+emacs@HIDDEN>
	<87y5vzpirv.fsf@HIDDEN>
Subject: RE: bug#9917: 24.0.90;
	Make `goto-line' consistent with the line number from the minibuffer
Date: Tue, 1 Nov 2011 16:22:05 -0700
Message-ID: <F60060A50EBA454AA3C82D60BC2AEB18@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: <87y5vzpirv.fsf@HIDDEN>
Thread-Index: AcyY6bPnw5laWPMGSfKDq5MqTeP6ogAAvBxw
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109
X-Source-IP: ucsinet22.oracle.com [156.151.31.94]
X-CT-RefId: str=0001.0A090206.4EB07F26.0066,ss=1,re=0.000,fgs=0
X-Spam-Score: -6.2 (------)
X-Debbugs-Envelope-To: 9917
Cc: 9917 <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/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: <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.2 (------)

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

For `goto-line':

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.





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

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


Received: (at 9917) by debbugs.gnu.org; 1 Nov 2011 22:59:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 01 18:59:53 2011
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 1RLNJB-0004rM-MQ
	for submit <at> debbugs.gnu.org; Tue, 01 Nov 2011 18:59:53 -0400
Received: from smarty.dreamhost.com ([208.113.175.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1RLNJ9-0004r8-Kz
	for 9917 <at> debbugs.gnu.org; Tue, 01 Nov 2011 18:59:52 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id EBFF76E80B0;
	Tue,  1 Nov 2011 15:57:30 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id DA034451C2D8;
	Tue,  1 Nov 2011 15:57:29 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#9917: 24.0.90;
	Make `goto-line' consistent with the line number from the minibuffer
Organization: JURTA
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
	<87pqhcyzms.fsf@HIDDEN>
	<jwvzkgfg2a8.fsf-monnier+emacs@HIDDEN>
Date: Wed, 02 Nov 2011 00:35:56 +0200
In-Reply-To: <jwvzkgfg2a8.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Tue, 01 Nov 2011 13:56:19 -0400")
Message-ID: <87y5vzpirv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 9917
Cc: 9917 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@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/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: <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 (--)

> Because depending on the use of narrow-to-region, you'll want widen
> or not.  Some code was written with some particular uses in mind, while
> other code was written with other uses in mind, hence
> the inconsistencies.

Yes, I can confirm this: 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.




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

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


Received: (at 9917) by debbugs.gnu.org; 1 Nov 2011 17:58:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 01 13:58:43 2011
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 1RLIbi-0006FS-8p
	for submit <at> debbugs.gnu.org; Tue, 01 Nov 2011 13:58:42 -0400
Received: from pruche.dit.umontreal.ca ([132.204.246.22])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1RLIbf-0006FC-7t
	for 9917 <at> debbugs.gnu.org; Tue, 01 Nov 2011 13:58:41 -0400
Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca
	[132.204.27.242])
	by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id pA1HuEdX012038;
	Tue, 1 Nov 2011 13:56:14 -0400
Received: by faina.iro.umontreal.ca (Postfix, from userid 20848)
	id 7A16AB465D; Tue,  1 Nov 2011 13:56:19 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#9917: 24.0.90;
	Make `goto-line' consistent with the line number from the minibuffer
Message-ID: <jwvzkgfg2a8.fsf-monnier+emacs@HIDDEN>
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
	<87pqhcyzms.fsf@HIDDEN>
Date: Tue, 01 Nov 2011 13:56:19 -0400
In-Reply-To: <87pqhcyzms.fsf@HIDDEN> (Juri Linkov's message of "Tue,
	01 Nov 2011 11:35:01 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV4028=0
X-NAI-Spam-Version: 2.2.0.9286 : core <4028> : streams <697455> : uri <997019>
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: 9917
Cc: 9917 <at> debbugs.gnu.org, Dani Moncayo <dmoncayo@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/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: <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.2 (----)

> Just removing `(widen)' from `goto-line' will fix this.  But the question is
> why it's here.  What was the intention of adding `(widen)' here.

Because depending on the use of narrow-to-region, you'll want widen
or not.  Some code was written with some particular uses in mind, while
other code was written with other uses in mind, hence
the inconsistencies.

The difference is whether narrow-to-region really wants to pretend the
text outside the region doesn't exist at all (e.g. in Rmail or Info), or
whether it is just meant to temporarily only display a subpart
(e.g. most other cases).

Then things get interesting when the user uses narrow-to-region in Info
or Rmail.  Currently the only data we have to distinguish the two cases
is font-lock-dont-widen, but clearly it's not sufficient to handle the
"user narrowing in Info" case.


        Stefan




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

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


Received: (at 9917) by debbugs.gnu.org; 1 Nov 2011 09:38:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 01 05:38:02 2011
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 1RLAnC-0000AV-ES
	for submit <at> debbugs.gnu.org; Tue, 01 Nov 2011 05:38:02 -0400
Received: from smarty.dreamhost.com ([208.113.175.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1RLAn8-00009z-Oc
	for 9917 <at> debbugs.gnu.org; Tue, 01 Nov 2011 05:38:00 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id 25F936E80A4;
	Tue,  1 Nov 2011 02:35:42 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 40E49451C5B8;
	Tue,  1 Nov 2011 02:35:41 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
To: Dani Moncayo <dmoncayo@HIDDEN>
Subject: Re: bug#9917: 24.0.90;
	Make `goto-line' consistent with the line number from the minibuffer
Organization: JURTA
References: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
Date: Tue, 01 Nov 2011 11:35:01 +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: <87pqhcyzms.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 9917
Cc: 9917 <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/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: <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 (--)

> When you are in a narrowed buffer (e.g. an Info buffer), the line
> number that you see in the mode-line is relative to the narrowed
> portion, whereas the `goto-line' (M-g g) command requires you to
> supply an absolute line number.
>
> 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.

Just removing `(widen)' from `goto-line' will fix this.  But the question is
why it's here.  What was the intention of adding `(widen)' here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#9917; Package emacs. 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 submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Oct 2011 14:33:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 31 10:33:45 2011
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 1RKsvo-0005XF-CK
	for submit <at> debbugs.gnu.org; Mon, 31 Oct 2011 10:33:45 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <dmoncayo@HIDDEN>) id 1RKsvm-0005X9-JX
	for submit <at> debbugs.gnu.org; Mon, 31 Oct 2011 10:33:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dmoncayo@HIDDEN>) id 1RKstd-0002pm-RL
	for submit <at> debbugs.gnu.org; Mon, 31 Oct 2011 10:31:30 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:58600)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dmoncayo@HIDDEN>) id 1RKstd-0002pi-Nc
	for submit <at> debbugs.gnu.org; Mon, 31 Oct 2011 10:31:29 -0400
Received: from eggs.gnu.org ([140.186.70.92]:57484)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dmoncayo@HIDDEN>) id 1RKstc-00009e-FB
	for bug-gnu-emacs@HIDDEN; Mon, 31 Oct 2011 10:31:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dmoncayo@HIDDEN>) id 1RKsta-0002pK-7m
	for bug-gnu-emacs@HIDDEN; Mon, 31 Oct 2011 10:31:28 -0400
Received: from mail-yw0-f41.google.com ([209.85.213.41]:48791)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dmoncayo@HIDDEN>) id 1RKsta-0002p5-0r
	for bug-gnu-emacs@HIDDEN; Mon, 31 Oct 2011 10:31:26 -0400
Received: by ywa17 with SMTP id 17so6959024ywa.0
	for <bug-gnu-emacs@HIDDEN>; Mon, 31 Oct 2011 07:31:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=e9226vFOEIFsaSvkLMkvxeME71TVVxtB/EtIrT9L0fA=;
	b=O0qbfp/44dL/x9GG2UPeGtD818Q9yvZ1qg23SvStitr3mYhHS25mRsE01m4FAyfGNL
	e9YYYHE1JYqbFfM8+rj2X6EvAL6OmiTx1OFzsjQUcb6QHp8rVmcFhDoJGBnLckL1Z+iZ
	8nRRKiUCoOllMmq3208fNSiUMWkpb7zOpsnd0=
MIME-Version: 1.0
Received: by 10.236.75.225 with SMTP id z61mr17405835yhd.1.1320071484863; Mon,
	31 Oct 2011 07:31:24 -0700 (PDT)
Received: by 10.236.36.40 with HTTP; Mon, 31 Oct 2011 07:31:22 -0700 (PDT)
Date: Mon, 31 Oct 2011 15:31:22 +0100
Message-ID: <CAH8Pv0jBbJoyJfW+Xh-m3kqGQnVc0eO2+kM40SJ23JOKiBrx-A@HIDDEN>
Subject: 24.0.90;
	Make `goto-line' consistent with the line number from the minibuffer
From: Dani Moncayo <dmoncayo@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.9 (----)
X-Debbugs-Envelope-To: submit
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/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: <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.9 (----)

Hi,

When you are in a narrowed buffer (e.g. an Info buffer), the line
number that you see in the mode-line is relative to the narrowed
portion, whereas the `goto-line' (M-g g) command requires you to
supply an absolute line number.

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.


In GNU Emacs 24.0.90.1 (i386-mingw-nt6.1.7601)
 of 2011-10-27 on DANI-PC
Windowing system distributor `Microsoft Corp.', version 6.1.7601
configured using `configure --with-gcc (4.5)'

-- 
Dani Moncayo




Acknowledgement sent to Dani Moncayo <dmoncayo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#9917; 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: Fri, 31 Oct 2014 17:00:04 UTC

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