all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark Lillibridge <mark.lillibridge@hp.com>
To: 9831@debbugs.gnu.org
Subject: bug#9831: cause of bug found!  [PATCH]
Date: Sat, 22 Oct 2011 14:26:23 -0700	[thread overview]
Message-ID: <qmh8vochg5c.fsf@hp.com> (raw)
In-Reply-To: <qmhd3dohi26.fsf@hp.com> (message from Mark Lillibridge on Sat, 22 Oct 2011 13:45:05 -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





  reply	other threads:[~2011-10-22 21:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-22 11:08 bug#9831: 24.0.90; o and c-o in RMAIL change buffer john ffitch
2011-10-22 20:06 ` bug#9831: narrowing the bug down Mark Lillibridge
2011-10-22 20:45   ` Mark Lillibridge
2011-10-22 21:26     ` Mark Lillibridge [this message]
2011-10-23  9:19       ` bug#9831: cause of bug found! [PATCH] martin rudalics
2011-10-23 20:21         ` Mark Lillibridge
2011-10-24  9:31           ` martin rudalics
2011-10-27  2:53             ` Mark Lillibridge
2011-10-27  9:52               ` martin rudalics
2011-10-27  3:09 ` bug#9831: Your bug report re: o and c-o in RMAIL change buffer Mark Lillibridge
2011-11-14  9:32   ` bug#9831: " Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=qmh8vochg5c.fsf@hp.com \
    --to=mark.lillibridge@hp.com \
    --cc=9831@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.