Subject: Re: bug#2137: 23.0.60; Saving Rmail buffer does not show the "Saving file ..." message

From: Eli Zaretskii <[email-masked]>
Date: Wed, 04 Feb 2009 22:12:47 +0200

> From: Richard M Stallman <[email-masked]>
> CC: [email-masked], [email-masked], [email-masked]
> Date: Wed, 04 Feb 2009 13:27:49 -0500
> 
>     > IMO, using annotations for the job of saving the mailbox is also a
>     > horrible kludge.  All that just to avoid defining an Rmail-specific
>     > binding for C-x C-s ...
> 
>     Thanks for your support,
> 
> An Rmail-specific binding for C-x C-s is not enough to make saving
> work correctly.  Users can save the file through C-x s also, and other
> commands too.  The common mechanism for these commands is
> `save-buffer'; whatever makes them save the right text has to work
> inside there.

So we could introduce some mechanism specific for such situation, like
some hook that save-buffer would call or something.  Annotations just
aren't that mechanism, they exist to add text to the buffer before it
is written.

>      we could add to
>     rmail-write-region-annotate another hack: a call to buffer-size
>     followed by the same message "Saving file ..." that should have been
>     displayed by save-buffer.
> 
> The difficulty here is to display that message only in the case
> where the hook was ultimately called from `save-buffer'.

rmail-write-region-annotate uses its first argument to deduce that it
is being called to write the entire buffer.  Why couldn't the same
logic be used for the message?