GNU bug report logs - #9831
24.0.90; o and c-o in RMAIL change buffer

Previous Next

Package: emacs;

Reported by: john ffitch <jpff <at> codemist.co.uk>

Date: Sat, 22 Oct 2011 11:11:01 UTC

Severity: normal

Found in version 24.0.90

Fixed in version 24.0.92

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mark Lillibridge <mark.lillibridge <at> hp.com>
To: 9831 <at> debbugs.gnu.org
Subject: bug#9831: cause of bug found!  [PATCH]
Date: Sat, 22 Oct 2011 14:26:23 -0700
    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




This bug report was last modified 13 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.