From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#5042: 23.1; linum-mode gives incorrect line numbers with narrowed buffers Date: Tue, 1 Dec 2009 01:32:26 +0100 Message-ID: References: <200911260039.nAQ0dTD1019384@mailhub-pa1.hpl.hp.com> Reply-To: Juanma Barranquero , 5042@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1259628482 29592 80.91.229.12 (1 Dec 2009 00:48:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Dec 2009 00:48:02 +0000 (UTC) Cc: 5042@emacsbugs.donarmstrong.com, control@emacsbugs.donarmstrong.com To: mark.lillibridge@hp.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 01 01:47:54 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NFGu6-0007yI-56 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Dec 2009 01:47:42 +0100 Original-Received: from localhost ([127.0.0.1]:36811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFGu5-0006oF-Hd for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 19:47:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFGu0-0006nu-Ky for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 19:47:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFGtv-0006mm-Rj for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 19:47:36 -0500 Original-Received: from [199.232.76.173] (port=35014 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFGtv-0006mj-Ni for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 19:47:31 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40136) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NFGtv-00072X-6T for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 19:47:31 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB10lNGj013993; Mon, 30 Nov 2009 16:47:27 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nB10e40Z013232; Mon, 30 Nov 2009 16:40:05 -0800 Resent-Date: Mon, 30 Nov 2009 16:40:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juanma Barranquero Resent-To: bug-submit-list@donarmstrong.com Resent-CC: markus.triska@gmx.at, Emacs Bugs 2Resent-Date: Tue, 01 Dec 2009 00:40:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 5042 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5042-submit@emacsbugs.donarmstrong.com id=B5042.125962757412743 (code B ref 5042); Tue, 01 Dec 2009 00:40:04 +0000 Original-Received: (at 5042) by emacsbugs.donarmstrong.com; 1 Dec 2009 00:32:54 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 Original-Received: by fxm7 with SMTP id 7so4602075fxm.9 for ; 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= Original-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@mailhub-pa1.hpl.hp.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 30 Nov 2009 19:47:36 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33095 Archived-At: X-Debbugs-CC: markus.triska@gmx.at quit On Thu, Nov 26, 2009 at 01:39, Mark Lillibridge 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