On Mon, Apr 14 2014, Alexis <[email protected]> wrote:
> Dirk-Jan C. Binnema <[email protected]> writes:
>
>> I have never seen this... do you have any specific settings that may
>> play a role here?
>
> The major difficulty is that this issue is intermittent; i can't
> reproduce it reliably. Sometimes exiting and restarting mu4e fixes the
> issue, sometimes it doesn't. Sometimes existing and restarting Emacs
> itself fixes the issue, sometimes it doesn't. Sometimes the issue
> spontaneously disappears of its own accord, and doesn't reappear for
> days or even weeks at a time. So the problem comes and goes in a way
> that makes it difficult to narrow down possible causes, including
> personal settings.

Looking at the code a bit, I noticed the following, which might help you
dig further. IIUC the code that you say triggers the error is this
snippet from `message-do-fcc', specifically the call to `erase-buffer':

      (when file
        (set-buffer (get-buffer-create " *message temp*"))
        (erase-buffer)
        ...)

Here, `set-buffer' first switches to a buffer with the name 
" *message temp*". Presumably, when the error occurs, this is an
existing buffer still containing a header separator put there by mu4e.
(We know that it must have been mu4e that put it there, because of the
special error message.) Because this header separator has a read-only
property, the call to erase-buffer fails.

The cause of the problem may be that message.el assumes that the header
separator is *not* read-only. This can be surmised from a comment in
sendmail.el, where `mail-header-separator' is defined:

,----
| ;;;###autoload
| (defcustom mail-header-separator (purecopy "--text follows this line--")
|   "Line used to separate headers from text in messages being composed."
|   :type 'string
|   :group 'sendmail)
| 
| ;; Set up mail-header-separator for use as a category text property.
| (put 'mail-header-separator 'rear-nonsticky '(category))
| ;; This was a nice idea, for preventing accidental modification of
| ;; the separator.   But I found it also prevented or obstructed
| ;; certain deliberate operations, such as copying the separator line
| ;; up to the top to send myself a copy of an already sent outgoing message
| ;; and other things.  So I turned it off.  --rms.
| ;;(put 'mail-header-separator 'read-only t)
`----

The last part is relevant: apparently, RMS decided against making the
mail-header-separator 'read-only. So we may assume that the code of
message.el and of gnus in general assumes that the header separator can
be deleted without setting `inhibit-read-only' to t.

Speculating a bit further here, it seems safe to assume that mu4e itself
does the right thing and makes sure the header separator is handled
properly. That would suggest that you see the problem because you
sometimes send messages outside of mu4e, perhaps through gnus or some
other package that uses message.el or sendmail.el. Are you, by any
chance?

Ultimately, if all this speculation is correct, the question is probably
whether it should be considered a bug that mu4e makes the header
separator read-only. But that's a question best answered by Dirk.



-- 
Joost Kremers
Life has its moments

-- 
You received this message because you are subscribed to the Google Groups 
"mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to