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: problem found Date: Fri, 20 Nov 2009 22:06:46 -0800 Message-ID: <200911210606.nAL66k3Z017990@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 1258784870 12288 80.91.229.12 (21 Nov 2009 06:27:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2009 06:27:50 +0000 (UTC) To: 4996@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 21 07:27:43 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 1NBjRe-0006QY-9P for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2009 07:27:42 +0100 Original-Received: from localhost ([127.0.0.1]:46395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBjRd-000241-MS for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2009 01:27:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBjRV-00020C-Td for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 01:27:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBjRQ-0001rK-Jo for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 01:27:32 -0500 Original-Received: from [199.232.76.173] (port=57470 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBjRQ-0001r2-9l for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 01:27:28 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46801) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NBjRP-0003ZP-IP for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2009 01:27:27 -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 nAL6RLTB010751; Fri, 20 Nov 2009 22:27:25 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAL6F45b009291; Fri, 20 Nov 2009 22:15:04 -0800 Resent-Date: Fri, 20 Nov 2009 22:15:04 -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 06:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4996 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4996-submit@emacsbugs.donarmstrong.com id=B4996.12587836208598 (code B ref 4996); Sat, 21 Nov 2009 06:15:04 +0000 Original-Received: (at 4996) by emacsbugs.donarmstrong.com; 21 Nov 2009 06:07:00 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 nAL66vG5008592 for <4996@emacsbugs.donarmstrong.com>; Fri, 20 Nov 2009 22:06:59 -0800 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 nAL66mNV013242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <4996@emacsbugs.donarmstrong.com>; Fri, 20 Nov 2009 22:06:49 -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 nAL66k3Z017990; Fri, 20 Nov 2009 22:06:47 -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: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 21 Nov 2009 01:27:32 -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:32793 Archived-At: Ah! I have figured out the problem. report-emacs-bug adds the intangible property to the instructions. Normally, forward-line skips past text with the intangible property and this is what happens when linum-update is called normally, hence those lines do not receive line numbers normally. [UPDATE: this is a different bug in linum as it normally reports incorrect line numbers in the presence of intangible text; ironically, the case I was reporting is one of the few when it reports the *correct* line numbers. Consider this a bug report for the behavior of the window-scroll-functions callers.] However, for some reason inhibit-point-motion-hooks is set to t when the window-scroll-functions hooks are called. This causes linum-update, which uses forward-line, to number the intangible lines only when called from the scrolling hook. The following code change, which fixes the bug, demonstrates this: [UPDATE: this actually breaks linum further] (defun linum-after-scroll (win start) (let ((old inhibit-point-motion-hooks)) (setq inhibit-point-motion-hooks nil) (linum-update (window-buffer win)) (setq inhibit-point-motion-hooks old))) I am not sure if the actual bug here is with the callers of window-scroll-functions incorrectly setting inhibit-point-motion-hooks or with linum-after-scroll (in which case, the documentation for window-scroll-functions should mention this behavior). If the later, a better patch should be used that uses unwind-protect or the like. - Mark