* bug#2941: rmail's new handling of Babyl files is odd
@ 2009-04-09 19:48 ` Glenn Morris
2009-04-10 14:26 ` Richard M Stallman
2009-05-18 17:05 ` bug#2941: marked as done (rmail's new handling of Babyl files is odd) Emacs bug Tracking System
0 siblings, 2 replies; 24+ messages in thread
From: Glenn Morris @ 2009-04-09 19:48 UTC (permalink / raw)
To: bug-gnu-emacs
Severity: serious
The new way in which Rmail treats Babyl files is odd:
emacs -Q
C-u M-x rmail RET some-babyl-file RET
"Replacing BABYL format with mbox format...done"
Before I can read the above message, it is replaced with the next:
"Marking buffer unmodified to avoid rewriting Babyl file as mbox file"
Now I try to modify the buffer:
1) By adding a label.
a foo RET
"Marking buffer unmodified to avoid rewriting Babyl file as mbox file"
2) By editing a message.
e
make change to message
C-c C-c
"Marking buffer unmodified to avoid rewriting Babyl file as mbox file"
3) By deleting a message.
d
"Marking buffer unmodified to avoid rewriting Babyl file as mbox file"
Why do all of these leave the buffer unmodified? If Emacs crashes now,
I will lose information.
4) By expunging a message.
x
y
Finally, the buffer is marked modified.
Now if I press "s" to save the buffer, it is saved without warning,
clobbering the existing Babyl file. I was expecting a confirmation
prompt.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: rmail's new handling of Babyl files is odd
2009-04-09 19:48 ` bug#2941: rmail's new handling of Babyl files is odd Glenn Morris
@ 2009-04-10 14:26 ` Richard M Stallman
2009-04-10 17:50 ` Glenn Morris
2009-05-18 17:05 ` bug#2941: marked as done (rmail's new handling of Babyl files is odd) Emacs bug Tracking System
1 sibling, 1 reply; 24+ messages in thread
From: Richard M Stallman @ 2009-04-10 14:26 UTC (permalink / raw)
To: Glenn Morris, 2941; +Cc: bug-gnu-emacs
Now if I press "s" to save the buffer, it is saved without warning,
clobbering the existing Babyl file. I was expecting a confirmation
prompt.
There is no way to ask for confirmation when saving a file. (Look at
basic-save-buffer.) Therefore I made it ask for confirmation when you
make a "major" change, that would imply changing formats later if you save the results.
Each kind of change can be treated as major or minor.
Editing the message should be major; I overlooked that one.
Please try the patch below.
I decided to treat changes in labels as minor, because showing a
message clears the "unseen" attribute. Treating that as major implies
querying hen it shows an unseen message, which is typically just after
visiting the file.
It would be possible to treat changes in "unseen" as minor
and changes in "deleted" as major, etc.
*** rmailedit.el.~1.57.~ 2009-03-14 14:26:33.000000000 -0400
--- rmailedit.el 2009-04-10 06:35:10.000000000 -0400
***************
*** 117,122 ****
--- 117,123 ----
(defun rmail-cease-edit ()
"Finish editing message; switch back to Rmail proper."
(interactive)
+ (rmail-change-format)
(if (rmail-summary-exists)
(with-current-buffer rmail-summary-buffer
(rmail-summary-enable)))
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: rmail's new handling of Babyl files is odd
2009-04-10 14:26 ` Richard M Stallman
@ 2009-04-10 17:50 ` Glenn Morris
2009-04-11 12:27 ` Richard M Stallman
0 siblings, 1 reply; 24+ messages in thread
From: Glenn Morris @ 2009-04-10 17:50 UTC (permalink / raw)
To: rms; +Cc: 2941
Richard M Stallman wrote:
> There is no way to ask for confirmation when saving a file.
write-file-functions?
It seems wrong to me that now I can end up converting a Babyl file to
mbox with no prompting at all.
> Editing the message should be major; I overlooked that one.
> Please try the patch below.
It prompts me when I abort an edit, which is inappropriate.
Aborting an edit does not modify the file.
If I answer "no" to the prompt, I'm stuck in the edit buffer, with no
way to get back to the regular Rmail buffer. One can just kill the
buffer and start again, but that is not obvious.
> I decided to treat changes in labels as minor, because showing a
> message clears the "unseen" attribute. Treating that as major implies
> querying hen it shows an unseen message, which is typically just after
> visiting the file.
>
> It would be possible to treat changes in "unseen" as minor
> and changes in "deleted" as major, etc.
You could easily distinguish user-defined labels from attributes.
Or perhaps you should only treat "unseen" as minor.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: rmail's new handling of Babyl files is odd
2009-04-10 17:50 ` Glenn Morris
@ 2009-04-11 12:27 ` Richard M Stallman
2009-04-13 1:05 ` Glenn Morris
0 siblings, 1 reply; 24+ messages in thread
From: Richard M Stallman @ 2009-04-11 12:27 UTC (permalink / raw)
To: Glenn Morris; +Cc: 2941
> There is no way to ask for confirmation when saving a file.
write-file-functions?
I have doubts that it gives the right behavior
in the case of more than one hook function, etc.
It seems wrong to me that now I can end up converting a Babyl file to
mbox with no prompting at all.
Not so. Any change that causes the buffer to be saved
will also prompt you (unless there's a bug and I overlooked some command).
> It would be possible to treat changes in "unseen" as minor
> and changes in "deleted" as major, etc.
You could easily distinguish user-defined labels from attributes.
Would not help -- deleted and unseen are both attributes.
Or perhaps you should only treat "unseen" as minor.
Maybe that would be better. Would you like to try out that behavior?
It prompts me when I abort an edit, which is inappropriate.
Aborting an edit does not modify the file.
That is a bug; aborting the edit should not prompt.
Does this fix it?
*** rmailedit.el.~1.58.~ 2009-04-10 10:16:48.000000000 -0400
--- rmailedit.el 2009-04-11 07:02:51.000000000 -0400
***************
*** 117,123 ****
(defun rmail-cease-edit ()
"Finish editing message; switch back to Rmail proper."
(interactive)
! (rmail-modify-format)
(if (rmail-summary-exists)
(with-current-buffer rmail-summary-buffer
(rmail-summary-enable)))
--- 117,124 ----
(defun rmail-cease-edit ()
"Finish editing message; switch back to Rmail proper."
(interactive)
! (if (buffer-modified-p)
! (rmail-modify-format))
(if (rmail-summary-exists)
(with-current-buffer rmail-summary-buffer
(rmail-summary-enable)))
***************
*** 254,259 ****
--- 255,261 ----
(widen)
(delete-region (point-min) (point-max))
(insert rmail-old-text)
+ (set-buffer-modified-p nil)
(rmail-cease-edit)
(rmail-highlight-headers))
\f
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: rmail's new handling of Babyl files is odd
2009-04-11 12:27 ` Richard M Stallman
@ 2009-04-13 1:05 ` Glenn Morris
2009-04-13 1:27 ` Glenn Morris
2009-04-14 21:15 ` Richard M Stallman
0 siblings, 2 replies; 24+ messages in thread
From: Glenn Morris @ 2009-04-13 1:05 UTC (permalink / raw)
To: rms; +Cc: 2941
Richard M Stallman wrote:
> It seems wrong to me that now I can end up converting a Babyl file to
> mbox with no prompting at all.
>
> Not so. Any change that causes the buffer to be saved
> will also prompt you (unless there's a bug and I overlooked some command).
There's the one that prompted this report:
emacs -Q
C-u M-x rmail RET foo RET ; foo is a Babyl file with > 1 message
d
s
y
Now you have an mbox file, no prompting.
> Or perhaps you should only treat "unseen" as minor.
>
> Maybe that would be better. Would you like to try out that behavior?
If you're asking if I want to write a patch, then sorry, no.
> That is a bug; aborting the edit should not prompt.
> Does this fix it?
Aborting no longer prompts, but it marks the message as edited, which
is incorrect.
Also, aborting an edit now always marks the Rmail buffer as unmodified
(even if the initial Rmail file was mbox). It should restore the
pre-edit modification status.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: rmail's new handling of Babyl files is odd
2009-04-13 1:05 ` Glenn Morris
@ 2009-04-13 1:27 ` Glenn Morris
2009-04-14 21:15 ` Richard M Stallman
2009-04-14 21:15 ` Richard M Stallman
1 sibling, 1 reply; 24+ messages in thread
From: Glenn Morris @ 2009-04-13 1:27 UTC (permalink / raw)
To: 2941; +Cc: rms
Glenn Morris wrote:
> Aborting no longer prompts, but it marks the message as edited, which
> is incorrect.
>
> Also, aborting an edit now always marks the Rmail buffer as unmodified
> (even if the initial Rmail file was mbox). It should restore the
> pre-edit modification status.
Also, I think the behaviour is confusing if someone starts from a
Babyl file, edits a message, and then ends the edit. They get prompted
about the mbox conversion at this point. What are they supposed to do
if they answer "no"? At this point, their Rmail buffer has
(apparently) disappeared and been replaced by the edit buffer, and
it's not obvious how to get out of the edit and back to the normal
Rmail buffer without saying "yes".
For all these reasons, I suggest it would be better to prompt
immediately after the "e" key is pressed, before the edit buffer is
created.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: rmail's new handling of Babyl files is odd
2009-04-13 1:05 ` Glenn Morris
2009-04-13 1:27 ` Glenn Morris
@ 2009-04-14 21:15 ` Richard M Stallman
[not found] ` <stk55lloq7.fsf@fencepost.gnu.org>
1 sibling, 1 reply; 24+ messages in thread
From: Richard M Stallman @ 2009-04-14 21:15 UTC (permalink / raw)
To: Glenn Morris, 2941; +Cc: 2941
emacs -Q
C-u M-x rmail RET foo RET ; foo is a Babyl file with > 1 message
d
s
y
Does this patch give good results?
*** rmail.el.~1.534.~ 2009-04-10 10:13:07.000000000 -0400
--- rmail.el 2009-04-14 16:15:38.000000000 -0400
***************
*** 1458,1463 ****
--- 1458,1464 ----
"Expunge and save RMAIL file."
(interactive)
(set-buffer rmail-buffer)
+ (rmail-modify-format)
(rmail-expunge)
;; No need to swap buffers: rmail-write-region-annotate takes care of it.
;; (rmail-swap-buffers-maybe)
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: marked as done (rmail's new handling of Babyl files is odd)
2009-04-09 19:48 ` bug#2941: rmail's new handling of Babyl files is odd Glenn Morris
2009-04-10 14:26 ` Richard M Stallman
@ 2009-05-18 17:05 ` Emacs bug Tracking System
1 sibling, 0 replies; 24+ messages in thread
From: Emacs bug Tracking System @ 2009-05-18 17:05 UTC (permalink / raw)
To: Chong Yidong
[-- Attachment #1: Type: text/plain, Size: 880 bytes --]
Your message dated Mon, 18 May 2009 12:58:52 -0400
with message-id <87ws8epctv.fsf@cyd.mit.edu>
and subject line Re: bug#2941: rmail's new handling of Babyl files is odd
has caused the Emacs bug report #2941,
regarding rmail's new handling of Babyl files is odd
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)
--
2941: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2941
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems
[-- Attachment #2: Type: message/rfc822, Size: 3121 bytes --]
From: Glenn Morris <rgm@gnu.org>
To: bug-gnu-emacs@gnu.org
Subject: rmail's new handling of Babyl files is odd
Date: Thu, 09 Apr 2009 15:48:12 -0400
Message-ID: <xd63hdwqv7.fsf@fencepost.gnu.org>
Severity: serious
The new way in which Rmail treats Babyl files is odd:
emacs -Q
C-u M-x rmail RET some-babyl-file RET
"Replacing BABYL format with mbox format...done"
Before I can read the above message, it is replaced with the next:
"Marking buffer unmodified to avoid rewriting Babyl file as mbox file"
Now I try to modify the buffer:
1) By adding a label.
a foo RET
"Marking buffer unmodified to avoid rewriting Babyl file as mbox file"
2) By editing a message.
e
make change to message
C-c C-c
"Marking buffer unmodified to avoid rewriting Babyl file as mbox file"
3) By deleting a message.
d
"Marking buffer unmodified to avoid rewriting Babyl file as mbox file"
Why do all of these leave the buffer unmodified? If Emacs crashes now,
I will lose information.
4) By expunging a message.
x
y
Finally, the buffer is marked modified.
Now if I press "s" to save the buffer, it is saved without warning,
clobbering the existing Babyl file. I was expecting a confirmation
prompt.
[-- Attachment #3: Type: message/rfc822, Size: 1426 bytes --]
From: Chong Yidong <cyd@stupidchicken.com>
To: rms@gnu.org
Cc: 2941-done@emacsbugs.donarmstrong.com
Subject: Re: bug#2941: rmail's new handling of Babyl files is odd
Date: Mon, 18 May 2009 12:58:52 -0400
Message-ID: <87ws8epctv.fsf@cyd.mit.edu>
> >> C-u M-x rmail RET foo RET
> >> d
> >> x
> >> y
> >> C-x C-s
> >
> > Could you propose a patch that catches this case?
>
> I can easily make this do whatever people generally want.
> I did not want to change it for one vociferous person,
> but I will gladly change to follow the general preference.
OK, I see you've done that. Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: rmail's new handling of Babyl files is odd
@ 2009-05-05 2:08 Chong Yidong
2009-05-07 2:03 ` Glenn Morris
0 siblings, 1 reply; 24+ messages in thread
From: Chong Yidong @ 2009-05-05 2:08 UTC (permalink / raw)
To: Glenn Morris; +Cc: 2941, rms
> It fixes the above sequence; however I can still go from Babyl to mbox
> with no prompting by doing:
>
> C-u M-x rmail RET foo RET
> d
> x
> y
> C-x C-s
Could you propose a patch that catches this case?
^ permalink raw reply [flat|nested] 24+ messages in thread
* bug#2941: rmail's new handling of Babyl files is odd
@ 2009-05-15 2:22 Chong Yidong
0 siblings, 0 replies; 24+ messages in thread
From: Chong Yidong @ 2009-05-15 2:22 UTC (permalink / raw)
To: Richard M Stallman; +Cc: 2941
> >> C-u M-x rmail RET foo RET
> >> d
> >> x
> >> y
> >> C-x C-s
> >
> > Could you propose a patch that catches this case?
>
> I can easily make this do whatever people generally want.
> I did not want to change it for one vociferous person,
> but I will gladly change to follow the general preference.
Please make the change, then---either there should be a second prompt,
or the first prompt should be changed in this case to make it clear that
the file will be converted.
Thank you.
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2009-05-18 17:05 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87ws8epctv.fsf@cyd.mit.edu>
2009-04-09 19:48 ` bug#2941: rmail's new handling of Babyl files is odd Glenn Morris
2009-04-10 14:26 ` Richard M Stallman
2009-04-10 17:50 ` Glenn Morris
2009-04-11 12:27 ` Richard M Stallman
2009-04-13 1:05 ` Glenn Morris
2009-04-13 1:27 ` Glenn Morris
2009-04-14 21:15 ` Richard M Stallman
2009-04-14 21:15 ` Richard M Stallman
[not found] ` <stk55lloq7.fsf@fencepost.gnu.org>
2009-04-16 9:18 ` Richard M Stallman
2009-04-16 17:31 ` Glenn Morris
2009-04-16 17:55 ` Eli Zaretskii
2009-04-16 20:31 ` Glenn Morris
2009-04-16 21:25 ` Eli Zaretskii
2009-04-17 14:27 ` Richard M Stallman
2009-04-18 1:25 ` Glenn Morris
2009-04-19 3:24 ` Richard M Stallman
2009-04-20 18:29 ` Glenn Morris
2009-04-20 23:23 ` Stefan Monnier
2009-04-18 14:37 ` Stefan Monnier
2009-05-18 17:05 ` bug#2941: marked as done (rmail's new handling of Babyl files is odd) Emacs bug Tracking System
2009-05-05 2:08 bug#2941: rmail's new handling of Babyl files is odd Chong Yidong
2009-05-07 2:03 ` Glenn Morris
2009-05-08 8:03 ` Richard M Stallman
-- strict thread matches above, loose matches on Subject: below --
2009-05-15 2:22 Chong Yidong
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.