[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10117: duplicate evaluation of after-change-functions hooks in rever
bug#10117: duplicate evaluation of after-change-functions hooks in revert-buffer
Wed, 23 Nov 2011 12:18:15 +0100
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:18.104.22.168) Gecko/20110922 Thunderbird/3.1.15
I'm having a strange behavior while trying to track the modifications to
a buffer: calling revert-buffer triggers the following calls to my
- a region deletion (which is exactly the changed region between the
buffer and the file)
- a region insertion (the new contents for the changed region)
- the same insertion again.
I don't care about how many modifications the reverting is splited into,
or whether these are minimal or all the buffer contents is considered
new, but the duplicate insertion leads me into invalid assumptions about
the new contents (I use this to maintain a exact mapping of the buffer
into an external tool).
Am I wrong when I assume that the sequence of modifications passed to
the after-change-functions is an exact trace of the buffer contents
evolution ? What could possibly cause such a duplicate event ?
Note: I'm not doing anything strange in the hook like changing the
buffers' contents. This is just a numeric computation which update some
buffer-local variables which track the set of "unprocessed"
modifications. The hook is added as buffer-local (and global value of
after-change-functions is nil).
- bug#10117: duplicate evaluation of after-change-functions hooks in revert-buffer,
Tiphaine Turpin <=