Subject: Re: bug#58005: 13.1.4; Can't work with indirect buffers

From: Arash Esbati <[email-masked]>
Date: Thu, 07 Mar 2024 21:40:00 +0100

Ikumi Keita <[email-masked]> writes:

> Hi Philipp, please keep "Cc: [email-masked]" when you reply so
> that the thread of the discussion remain in the bug tracker.
>
>>>>>> "Philipp G. Haselwarter" <[email-masked]> writes:
>> Dear Keita,
>> Thank you for looking into this issue.
>
>> I frequently use indirect buffers when editing longer tex documents.
>> When I need to modify more than one part of a document at a time,
>> I split the base buffer via C-x 4 c `clone-indirect-buffer-other-window`.
>> This has the advantage that each view of the buffer has its own notion
>> of region, point, and marks. Frankly, I'd be surprised if this didn't affect
>> a fairly large number of users, as C-x 4 c is bound in vanilla Emacs.
>
>> The `(buffer-file-name (buffer-base-buffer))` pattern is pretty common,
>> for instance a simple grep in the emacs repo yields 58 hits alone, so I
>> think it's a reasonable solution. I would of course be happy to test and
>> report any other related issues that may arise.
>
> Thank you for your reply. It's probably true that `buffer-base-buffer'
> makes `buffer-file-name' usable in indirect buffers. However, what I'm
> worrying is that other potential incompatibilities sparsely continue to
> pop up and each ad-hoc deal eventually amounts to make AUCTeX unstable,
> given a lot of subtlety regarding to `TeX-master-file'.[1]

I agree, the "indirect buffers" feature is provided by vanilla Emacs,
but trying to support it inside AUCTeX may introduce a lot a headache.
I also vote not try to implement it.

> Any takers out there? (My preliminary idea is, as I wrote in my previous
> message, to modify C-c C-c and alikes so that they suggest to switch to
> the base buffer and run there when they are called in an indirect
> buffer.)

Patches are always welcome.  But for now, I'm closing this report.  We
can reopen if there are complete patches to discuss.

Best, Arash