There is a confusing bit in A. S. Byatt's Possession, where she started writing a long excerpt from a diary, then forgot it was a diary entry and started writing about what was going to happen later, after the diary was supposed to have been written.