From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#4996: marked as done (23.1; linum mode fails to number lines properly when just scrolling buffer) Date: Tue, 24 Nov 2009 22:35:04 +0000 Message-ID: References: <200911210530.nAL5UkcT017095@mailhub-pa1.hpl.hp.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1259102104-31215-0" X-Trace: ger.gmane.org 1259103246 28770 80.91.229.12 (24 Nov 2009 22:54:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2009 22:54:06 +0000 (UTC) To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 24 23:54:00 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 1ND4Gk-0001fY-Mb for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Nov 2009 23:53:59 +0100 Original-Received: from localhost ([127.0.0.1]:46536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ND4Gk-0001q0-Jz for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Nov 2009 17:53:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ND4AV-0007BY-Ai for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2009 17:47:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ND4AQ-00079n-Ao for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2009 17:47:30 -0500 Original-Received: from [199.232.76.173] (port=35924 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ND4AQ-00079c-0X for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2009 17:47:26 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52430) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ND4AP-0007al-8n for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2009 17:47:25 -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 nAOMlMKo032271; Tue, 24 Nov 2009 14:47:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAOMZ5Xw031252; Tue, 24 Nov 2009 14:35:05 -0800 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 4996 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:32894 Archived-At: This is a multi-part message in MIME format... ------------=_1259102104-31215-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Tue, 24 Nov 2009 17:28:27 -0500 with message-id and subject line Re: bug#4996: problem found has caused the Emacs bug report #4996, regarding 23.1; linum mode fails to number lines properly when just scrol= ling buffer to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 4996: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D4996 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1259102104-31215-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 21 Nov 2009 05:31:08 +0000 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.5 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 nAL5V7hI004706 for ; Fri, 20 Nov 2009 21:31:08 -0800 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 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 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 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 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) 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 Date: Fri, 20 Nov 2009 21:30:46 -0800 Message-Id: <200911210530.nAL5UkcT017095@mailhub-pa1.hpl.hp.com> From: Mark Lillibridge To: bug-gnu-emacs@gnu.org Subject: 23.1; linum mode fails to number lines properly when just scrolling buffer Reply-to: mark.lillibridge@hp.com 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. 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 ------------=_1259102104-31215-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4996-done) by emacsbugs.donarmstrong.com; 24 Nov 2009 22:28:30 +0000 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=-3.9 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAOMSSOD030795 for <4996-done@emacsbugs.donarmstrong.com>; Tue, 24 Nov 2009 14:28:29 -0800 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nAOMSRH8017022; Tue, 24 Nov 2009 17:28:27 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 404E23A1B6; Tue, 24 Nov 2009 17:28:27 -0500 (EST) From: Stefan Monnier To: Markus Triska Subject: Re: bug#4996: problem found Message-ID: References: <200911210606.nAL66k3Z017990@mailhub-pa1.hpl.hp.com> Date: Tue, 24 Nov 2009 17:28:27 -0500 In-Reply-To: (Markus Triska's message of "Sat, 21 Nov 2009 09:25:11 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (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 RV3413=0 >> I propose changing that line to: >> >> (let ((old-inhibit inhibit-point-motion-hooks)) >> (setq inhibit-point-motion-hooks t) >> (forward-line) >> (setq inhibit-point-motion-hooks old-inhibit)) > I suggest: > (let ((inhibit-point-motion-hooks t)) > (forward-line)) Thanks, installed, Stefan ------------=_1259102104-31215-0--