Subject: bug#17893: 24.4.50; (error "Marker does not point anywhere")

From: Eli Zaretskii <[email-masked]>
Date: Sat, 25 Nov 2017 18:06:46 +0200

> Date: Sat, 25 Nov 2017 15:13:08 +0100
> From: [email-masked] (Charles A. Roelli)
> CC: [email-masked], [email-masked]
> 
> > > To solve the problem more generally, maybe clone-buffer could look for
> > > local variables with a non-nil symbol property (called, say,
> > > `clone-buffer-update-function'), the value of which would be a
> > > function that updates the "cloned" variable properly.
> > 
> > This is not different from running a clone-buffer-update-function: it
> > again lets modes take care of the variables thy know about which need
> > special handling at clone time.  My problem with that is that I don't
> > believe this is a complete solution.
> 
> Can you say what you think is missing?

What is missing is a way of methodically walking all the markers
reachable from the cloned buffer's local variables, and changing each
marker to point to the cloned buffer instead of the parent buffer.