* RMail bug resulting in lost messages. Again
@ 2007-01-16 22:45 Christopher Neufeld
2007-01-18 17:27 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Neufeld @ 2007-01-16 22:45 UTC (permalink / raw)
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers 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.
In GNU Emacs 21.4.1 (i686-pc-linux-gnu, X toolkit)
of 2005-10-30 on londo.cneufeld.ca
configured using `configure --prefix=/usr --with-x --with-xpm --with-jpeg --with-tiff --with-gif --with-png'
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: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
This is the same bug I reported to gnu.emacs.bug in message
<x7lmdk4yr9.fsf@magma.ca> five years ago. The patch I submitted then has
not been incorporated into the code, and as of 21.4.1, RMail still deletes
messages that the user believes he is saving to a disk file.
Here is the original news posting:
I just noticed a rather unfortunate bug in rmail in Emacs 21.1 which
has resulted in a significant quantity of lost email. I have
rmail-delete-after-output set to 't, and I usually save messages in
mbox format. (Note that this bug also affects users who have set
rmail-delete-after-output to nil, it just requires a bit more action
on the users' parts.)
I might receive several messages, and decide to save all of them to
the same file. I generally type something like:
C-U 8 C-o
which saves the eight messages to a filename (prompted), and deletes
them from the rmail inbox.
Unfortunately, a bug in the mbox saving (but not in the rmail format
saving) results in the currently selected message being saved into the
file 8 times, then all eight messages being deleted. Then, it's just
a simple rmail-summary-expunge followed by save-buffers-kill-emacs,
and the 7 unsaved messages are available only in the backup save file.
Do this once more, and they vanish forever as the backup save file is
overwritten.
The fix. Well, the buggy operations occur within
rmail-summary-output, while the correct behaviour is observed in
rmail-summary-output-to-rmail-file. These two functions ought to be
essentially identical, the first calling rmail-output where the second
calls rmail-output-to-rmail-file. There is a block of code, used for
selecting the message to operate upon, which is entirely absent in the
buggy code. This patch restores the correct behaviour on my system,
by restoring the symmetry between the two output functions.
--- 21.1/lisp/mail/rmailsum.el.orig Fri Feb 22 22:40:30 2002
+++ 21.1/lisp/mail/rmailsum.el Fri Feb 22 23:00:35 2002
@@ -1525,8 +1525,14 @@
(progn (require 'rmailout)
(list (rmail-output-read-file-name)
(prefix-numeric-value current-prefix-arg))))
- (let ((i 0))
- (while (< i n)
+ (let ((i 0) prev-msg)
+ (while
+ (and (< i n)
+ (progn (rmail-summary-goto-msg)
+ (not (eq prev-msg
+ (setq prev-msg
+ (with-current-buffer rmail-buffer
+ rmail-current-message))))))
(setq i (1+ i))
(with-current-buffer rmail-buffer
(let ((rmail-delete-after-output nil))
Of course, the .elc file should be updated after this, with
byte-compile-file.
--
Christopher Neufeld
Home page: http://www.cneufeld.ca/neufeld
"Don't edit reality for the sake of simplicity"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RMail bug resulting in lost messages. Again
2007-01-16 22:45 RMail bug resulting in lost messages. Again Christopher Neufeld
@ 2007-01-18 17:27 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2007-01-18 17:27 UTC (permalink / raw)
Cc: bug-gnu-emacs
This has been fixed in the coming Emacs 22 release.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-18 17:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-16 22:45 RMail bug resulting in lost messages. Again Christopher Neufeld
2007-01-18 17:27 ` Richard Stallman
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.