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