From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Lillibridge Newsgroups: gmane.emacs.bugs Subject: bug#4996: 23.1; linum mode fails to number lines properly when just scrolling buffer Date: Fri, 20 Nov 2009 21:30:46 -0800 Message-ID: <200911210530.nAL5UkcT017095@mailhub-pa1.hpl.hp.com> Reply-To: mark.lillibridge@hp.com, 4996@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1258782461 8531 80.91.229.12 (21 Nov 2009 05:47:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2009 05:47:41 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 21 06:47:34 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 1NBion-0005OJ-SK for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2009 06:47:34 +0100 Original-Received: from localhost ([127.0.0.1]:47931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBion-0006Dj-Fc for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2009 00:47:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBioi-0006DW-Ou for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 00:47:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBioe-0006D4-Q4 for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 00:47:28 -0500 Original-Received: from [199.232.76.173] (port=41509 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBioe-0006D1-L5 for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 00:47:24 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38358) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NBiod-0006KI-KV for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 00:47:23 -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 nAL5lLKI006030; Fri, 20 Nov 2009 21:47:21 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAL5e648005311; Fri, 20 Nov 2009 21:40:06 -0800 Resent-Date: Fri, 20 Nov 2009 21:40:06 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Mark Lillibridge Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 21 Nov 2009 05:40:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4996 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12587814684709 (code B ref -1); Sat, 21 Nov 2009 05:40:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 21 Nov 2009 05:31:08 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 nAL5V7hI004706 for ; Fri, 20 Nov 2009 21:31:08 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBiYs-0000Eb-S8 for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 00:31:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBiYn-0000C3-HN for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 00:31:05 -0500 Original-Received: from [199.232.76.173] (port=58564 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBiYn-0000C0-Ad for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 00:31:01 -0500 Original-Received: from madara.hpl.hp.com ([192.6.19.124]:53966) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NBiYm-0003xA-6L for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 00:31:00 -0500 Original-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 nAL5UmZH010617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 20 Nov 2009 21:30:48 -0800 (PST) Original-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 nAL5UkcT017095; Fri, 20 Nov 2009 21:30:46 -0800 X-HPL-MailScanner: Found to be clean X-HPL-MailScanner-From: mark.lillibridge@hp.com X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 21 Nov 2009 00:47:28 -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:32792 Archived-At: 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@gnu.org 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: In emacs, invoke report-emacs-bug :-) while global-linum-mode is on. Observe that there is some kind of overlay that occupies 9 lines before this point. That is, the spot where this paragraph starts is labeled line 7. Now page down (^v) and back (esc v). Observe that now every display line, including inside the overlay, has a line number. *BUG* What was line 7 is now shown as line 17. As soon as you do another command like a right arrow, the line numbers revert to the original correct line numbering. Linum has a hook for window-scroll-functions: linum.el:74: (define-minor-mode linum-mode "Toggle display of line numbers in the left margin." :lighter "" ; for desktop.el (if linum-mode (progn (if linum-eager (add-hook 'post-command-hook (if linum-delay 'linum-schedule 'linum-update-current) nil t) (add-hook 'after-change-functions 'linum-after-change nil t)) (add-hook 'window-scroll-functions 'linum-after-scroll nil t) (add-hook 'window-size-change-functions 'linum-after-size nil t) (add-hook 'change-major-mode-hook 'linum-delete-overlays nil t) (add-hook 'window-configuration-change-hook 'linum-after-config nil t) (linum-update-current)) linum.el:175: (defun linum-after-scroll (win start) (linum-update (window-buffer win))) If I disable this function by doing (via {esc}:): (defun linum-after-scroll (win start) t) the bug goes away. I am investigating further, but the problem appears to be that forward-line acts differently during window-scroll-functions hook then normally. Some sort of dynamic variable binding, perhaps? - Mark