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

From: Stefan Monnier <[email-masked]>
Date: Wed, 14 Dec 2022 15:10:59 -0500

>> For indirect clones, yes.  The original motivation for this infrastructure
>> was Info where we use `clone-buffer` and hence `clone-buffer-hook`.
> I see.  Though `clone-indirect-buffer-hook' is probably more appropriate
> to be used in the context of this bug report.

If `org-capture` uses an indirect buffer, indeed.
Modes which can be used with both should setup both hooks.

> Side note: Org implements something similar to `clone-buffer', but for
> file visiting buffers (`org-export-copy-buffer`).  Would it be something
> of interest for Emacs?

There seems to be a lot of overlap with `clone-buffer`, so it would make
sense to try and merge them, yes.  I don't think we want to
support/encourage situations where we have multiple buffers with the
same `buffer-file-name` like `org-export-copy-buffer` creates, but we
could provide some alternative where the clone has `buffer-file-name`
set to nil but the old value (or the origin bugger) is recorded in
another buffer-local var.

        Stefan