unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10041: 23.3; Rmail save messages fails to complete after deleting all the messages in an inbox if a summary buffer exists [PATCH]
@ 2011-11-13 19:40 Mark Lillibridge
  0 siblings, 0 replies; only message in thread
From: Mark Lillibridge @ 2011-11-13 19:40 UTC (permalink / raw)
  To: 10041


    This bug is easy to reproduce: create an Rmail inbox with a couple
of messages and show its summary via 'h'.  Now delete each of the
messages then hit 's'.  You will receive an error message "No messages
to summarize", the summary (if any) will fail to be updated (still shows
the deleted messages), the mode line for the Rmail buffer will show the
wrong number of messages, and the buffer is not actually saved!  You
have to hit 's' again to get it to actually save the buffer.


    This bug is a direct consequence of Bug #9964: 23.3; Rmail is no
longer able to display a summary buffer with no messages.  In
particular, rmail-new-summary[-1] throws an error if there are no
messages in the inbox and this prevents rmail-expunge-and-save from
completing its tasks.  The correct fix is to fix bug 9964 -- that is,
fix things so summary buffers with no messages work again.  In the
meantime, here's a workaround patch that just ignores errors from
rmail-summary.

- Mark


ts-rhel5 [122]% ( setenv LC_ALL C ; setenv TZ UTC0 ; diff -Naur original-rmail.el rmail2.el )
--- original-rmail.el   2011-02-23 23:23:08.000000000 +0000
+++ rmail2.el   2011-11-13 19:23:49.408122000 +0000
@@ -3425,8 +3425,11 @@
              (let ((total rmail-total-messages))
                (with-current-buffer rmail-summary-buffer
                  (let ((rmail-total-messages total))
-                   (rmail-update-summary))))
-           (rmail-select-summary (rmail-update-summary))))
+           ; ignore errors (twice) from rmail-update-summary as
+           ; workaround for bug #9964; FIXME: remove once that bug is
+           ; fixed:
+                   (ignore-errors (rmail-update-summary)))))
+           (rmail-select-summary (ignore-errors (rmail-update-summary)))))
       ;; We always show a message, because (rmail-only-expunge t)
       ;; leaves the rmail buffer unswapped.
       ;; If we expunged the current message, a new one is current now,





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-13 19:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-13 19:40 bug#10041: 23.3; Rmail save messages fails to complete after deleting all the messages in an inbox if a summary buffer exists [PATCH] Mark Lillibridge

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).