Subject: Re: bug#59618: 29.0.50; global-whitespace-mode + org-capture: "Marker does not point anywhere"

From: Richard Hansen <[email-masked]>
Date: Tue, 13 Dec 2022 01:25:22 -0500

I believe this is caused by an interaction between indirect buffers and 
after-change-functions.  In the buffer with the error, 
whitespace--update-bob-eob is in after-change-functions even though 
whitespace-color-on (which is the only place that hook is registered) is 
never called on the buffer.  whitespace-color-on sets up state that 
whitespace--update-bob-eob depends on, which is why the error occurs.

I see no mention of after-change-functions in the documentation for 
indirect buffers, and no mention of indirect buffers in the 
documentation for after-change-functions.  I'm not sure how they're 
supposed to interact, so I'm not sure if this is a bug in whitespace, 
indirect buffers, or even org.  We could slap a bandaid on whitespace.el 
to work around this issue, but I'd rather fix this the right way.  I'm 
not sure what the right way is; if someone who understands indirect 
buffers could give me some tips I'd appreciate it.

bug#46982 might be related.