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#9831: cause of bug found! [PATCH] Date: Sat, 22 Oct 2011 14:26:23 -0700 Message-ID: References: Reply-To: mark.lillibridge@hp.com NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1319318811 30053 80.91.229.12 (22 Oct 2011 21:26:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2011 21:26:51 +0000 (UTC) To: 9831@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 23:26:47 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RHj5a-0002Kl-Ha for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2011 23:26:46 +0200 Original-Received: from localhost ([::1]:40830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHj5Z-0001dM-RM for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2011 17:26:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHj5W-0001d5-Rz for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2011 17:26:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHj5V-0000SS-D7 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2011 17:26:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHj5V-0000SI-5h for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2011 17:26:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RHj6o-0000j2-9j for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2011 17:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark Lillibridge Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Oct 2011 21:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9831 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9831-submit@debbugs.gnu.org id=B9831.13193188732769 (code B ref 9831); Sat, 22 Oct 2011 21:28:02 +0000 Original-Received: (at 9831) by debbugs.gnu.org; 22 Oct 2011 21:27:53 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHj6f-0000ic-7j for submit@debbugs.gnu.org; Sat, 22 Oct 2011 17:27:53 -0400 Original-Received: from madara.hpl.hp.com ([192.6.19.124]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHj6d-0000iV-GW for 9831@debbugs.gnu.org; Sat, 22 Oct 2011 17:27:52 -0400 Original-Received: from mailhub-pa1.hpl.hp.com (mailhub-pa1.hpl.hp.com [15.25.115.25]) by madara.hpl.hp.com (8.14.4/8.14.4/HPL-PA Relay) with ESMTP id p9MLQPhX002009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <9831@debbugs.gnu.org>; Sat, 22 Oct 2011 14:26:26 -0700 Original-Received: from ts-rhel5 (ts-rhel5.hpl.hp.com [15.25.118.27]) by mailhub-pa1.hpl.hp.com (8.14.3/8.14.3/HPL-PA Hub) with ESMTP id p9MLQNvQ006655; Sat, 22 Oct 2011 14:26:24 -0700 In-reply-to: (message from Mark Lillibridge on Sat, 22 Oct 2011 13:45:05 -0700) X-Scanned-By: MIMEDefang 2.71 on 15.0.152.124 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 22 Oct 2011 17:28:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53032 Archived-At: Because this bug doesn't occur in Emacs 22, I compared to that code's version of rmail-summary: [Rmail 22] (defun rmail-summary () "Display a summary of all messages, one line per message." (interactive) (rmail-new-summary "All" '(rmail-summary) nil)) [Rmail 23.3] (defun rmail-summary () "Display a summary of all messages, one line per message." (interactive) (rmail-new-summary "All" '(rmail-summary) nil) (unless (get-buffer-window rmail-buffer) (rmail-summary-beginning-of-message))) As you can see, some well-meaning person added the functionality of move-to-start-of-message to the display summary command ('h') and broke rmail-output and associated functions. I checked and none of the other summary generating functions (e.g., rmail-summary-by-labels) have this functionality (added). On the assumption that somebody wanted this functionality, here is one way to patch things: ts-rhel5 [159]% ( setenv LC_ALL C ; setenv TZ UTC0 ; diff -Naur original-rmailsum.el rmailsum.el ) --- original-rmailsum.el 2011-10-22 21:03:14.834090000 +0000 +++ rmailsum.el 2011-10-22 21:22:00.443672000 +0000 @@ -71,16 +71,22 @@ ;; Regenerate the contents of the summary ;; using the same selection criterion as last time. +;; If current buffer is the summary buffer (rather than the Rmail +;; buffer), then does not make summary displayed if not already +;; displayed. ;; M-x revert-buffer in a summary buffer calls this function. (defun rmail-update-summary (&rest ignore) (apply (car rmail-summary-redo) (cdr rmail-summary-redo))) ;;;###autoload -(defun rmail-summary () - "Display a summary of all messages, one line per message." +(defun rmail-summary (&rest no-display) + "Display a summary of all messages, one line per message. + +If no-display is set, updates/creates the summary buffer, but does not +necessarily display it." (interactive) - (rmail-new-summary "All" '(rmail-summary) nil) - (unless (get-buffer-window rmail-buffer) + (rmail-new-summary "All" '(rmail-summary t) nil) + (unless (or no-display (get-buffer-window rmail-buffer)) (rmail-summary-beginning-of-message))) ;;;###autoload I believe it is now safe to remove the FIXME from rmailout.el: ;; FIXME should re-use existing windows. (if (rmail-summary-exists) (rmail-select-summary (rmail-update-summary))) - Mark