Subject: bug#18982: 24.4.51; assertion violation in set_cache_region after revert-buffer

From: Eli Zaretskii <[email-masked]>
Date: Fri, 07 Nov 2014 15:46:03 +0200

[Please CC the bug report.]

> Date: Fri, 07 Nov 2014 14:23:40 +0100
> From: Nicolas Richard <[email-masked]>
> 
> Le 07/11/2014 14:17, Eli Zaretskii a écrit :
> >> From: Nicolas Richard <[email-masked]>
> >> Date: Fri, 07 Nov 2014 12:22:29 +0100
> >> 
> >> Context : I was looking at an org file which had obviously not been
> >> properly decoded (it's an utf8 file, I was seeing raw bytes and the
> >> "buffer coding system" in the mode line was blank). So I decided to M-x
> >> revert-buffer to see if I could do something with it. That crashed.
> > 
> > Thanks.  Is this reproducible?  If so, could you send a recipe?
> 
> Unfortunately I couldn't reproduce. I tried reopening the file in a
> fresh session, but it didn't get the decoding wrong (i.e. it correctly
> decoded as utf8), and reverting the buffer went fine (I still don't know
> if the two are related).

To cause it to be incorrectly decoded, you could do this:

  C-x RET c raw-text RET C-x C-f FILENAME RET

If you remember which encoding Emacs decided to use, try that instead
of raw-text.