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#4878: 23.1; linum mode fails to work with Rmail correctly Date: Thu, 5 Nov 2009 22:48:45 -0800 Message-ID: <200911060648.nA66mjiA019689@mailhub-pa1.hpl.hp.com> Reply-To: mark.lillibridge@hp.com, 4878@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1257520720 11497 80.91.229.12 (6 Nov 2009 15:18:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Nov 2009 15:18:40 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 06 16:18:33 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 1N6Qa6-0005lo-LE for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Nov 2009 16:18:31 +0100 Original-Received: from localhost ([127.0.0.1]:46748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6Qa5-0007Oz-Un for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Nov 2009 10:18:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6Iuq-0007Vq-4T for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2009 02:07:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6Iul-0007VO-OW for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2009 02:07:23 -0500 Original-Received: from [199.232.76.173] (port=34023 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6Iul-0007VL-I0 for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2009 02:07:19 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:57006) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N6Iuk-0006PL-PE for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2009 02:07:19 -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 nA677GnQ019065; Thu, 5 Nov 2009 23:07:16 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nA66tE9e016844; Thu, 5 Nov 2009 22:55:14 -0800 Resent-Date: Thu, 5 Nov 2009 22:55:14 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Mark Lillibridge Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 06 Nov 2009 06:55:12 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4878 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125749014816262 (code B ref -1); Fri, 06 Nov 2009 06:55:12 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 6 Nov 2009 06:49: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 nA66n5xN016259 for ; Thu, 5 Nov 2009 22:49:07 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6Id6-0007pw-CG for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2009 01:49:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6Id0-0007kf-Ge for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2009 01:49:02 -0500 Original-Received: from [199.232.76.173] (port=37798 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6Id0-0007kL-8F for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2009 01:48:58 -0500 Original-Received: from gundega.hpl.hp.com ([192.6.19.190]:62377) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N6Icz-00042p-Eo for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2009 01:48:58 -0500 Original-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 nA66mlsR018020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 5 Nov 2009 22:48:47 -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 nA66mjiA019689; Thu, 5 Nov 2009 22:48:45 -0800 X-MailScanner-ID: nA66mlsR018020 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: Fri, 06 Nov 2009 02:07:23 -0500 X-Mailman-Approved-At: Fri, 06 Nov 2009 10:15: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:32448 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: [Emacs version 23.1 for Microsoft Windows, but should fail also for Linux, etc.] * Turn on linum mode via global-linum-mode * start Rmail. * use 'i' to open an existing Rmail file with multiple messages * type 'h' to open and go to the Rmail summary buffer * move between messages in the summary via the up and down arrows * observe that the associated Rmail buffer window shows the current message as you move around in the summary buffer, but its line numbers are not updated (BUG) I believe I understand the cause of this problem: linum.el relies on a post-command-hook to determine when to update a buffer: linum.el:79: (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)) linum.el:113: (defun linum-update-current () "Update line numbers for the current buffer." (linum-update (current-buffer))) (by default, linum-eager is t and linum-delay is nil). The Rmail summary buffer also relies on a post-command-hook to update the associated Rmail buffer: rmailsum.el:901: (defun rmail-summary-enable () (use-local-map rmail-summary-mode-map) (add-hook 'post-command-hook 'rmail-summary-rmail-update nil t) (setq revert-buffer-function 'rmail-update-summary)) When you type an arrow key in the Rmail summary buffer, rmail-summary-rmail-update updates the associated Rmail buffer; if linum-update-current runs afterwards (by default it seems to run before hand, but I manually made run afterwords via remove/add-hook), it updates the Rmail summary buffer but not the Rmail buffer itself. Linum seems to incorrectly assume that no command ever modifies any buffer other than the current one, which is definitely false in this case. As an attempted fix, I added the linum after-change-functions hook to the Rmail buffer. This also failed to solve the problem, presumably because changing the currently displayed message only involves altering the restriction, not changing the buffer itself. Since I am guessing Rmail is not the only subsystem where one command alters a different buffer or only changes a restriction in a different buffer, linum should be fixed rather than Rmail. The safest solution is probably to have linum-update-current just update all buffers. This strikes me as expensive if there are a lot of buffers, so maybe you can find a better solution. - Mark If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file c:/Program Files (x86)/Emacs/etc/DEBUG for instructions. In GNU Emacs 23.1.1 (i386-mingw-nt6.0.6002) of 2009-07-29 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 6.0.6002 configured using `configure --with-gcc (4.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: RMAIL Summary Minor modes in effect: global-linum-mode: t linum-mode: t delete-selection-mode: t pc-selection-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: v C-h v C-x o C-x o C-x 1 . n n n n p p p p p n n : C-y C-x o C-x o C-x o t t t t t t t t SPC SPC SPC SPC SPC SPC SPC \ SPC SPC C-h a h o o k C-h ? d h o o k C-x 1 C-x b C-h d h o o k s C-x 1 C-h f n a r r o w r e C-h v C-S-g x v c e r s e r s x r e p o r Recent messages: Showing message 7 Showing message 7...done Type C-x 1 to remove help window. Making completion list... Type C-x 1 to delete the help window. Quit GNU Emacs 23.1.1 (i386-mingw-nt6.0.6002) of 2009-07-29 on SOFT-MJASON Showing message 7 Showing message 7...done Making completion list...