Subject: bug#72241: 31.0.50; [PATCH] Use a dedicated buffer for `doc-view-open-text'

From: Tassilo Horn <[email-masked]>
Date: Tue, 23 Jul 2024 14:16:24 +0200

Manuel Giraud <[email-masked]> writes:

>> Here's a state machine describing the current behavior.
>>
>>     display <-- C-c C-c --> edit
>>     \     ^
>>      \     \
>>  C-c C-t  C-c C-c
>>        \     \
>>         `> text
>
> I think the current behavior is more like this (I suck at ASCII art):
>
>     display <-- C-c C-c --> edit
>     \                      ^
>      \                  /--
>  C-c C-t            C-c C-c
>        \        /--
>         `> text

You are right.

>> However, that now one can switch between foo.pdf and foo.pdf/text
>> independently, there is no guarantee that C-c C-c in the foo.pdf/text
>> buffer will return to foo.pdf in "display" state.  One could have
>> toggled to edit state there or even killed the foo.pdf buffer, so
>> there's nothing to return to.
>
> Yes, you're right.  In the latter case (the foo.pdf buffer was killed
> otherwise), a C-c C-c in the foo.pdf/text buffer just kill it, go to
> another buffer and the document is not open anywhere in any form.
> Maybe it is a not so bad behavior.

No, I think that's ok.

>> So I'd say: right now it is a state machine with 3 states but with
>> Manuel's patch the current "text" state becomes an auxiliary view.
>
> Yes.  So I'm going to try to fix my patch with your remarks (maybe fix
> the info also) and come up with a NEWS entry.  Thanks.

Great, thanks!

Bye,
  Tassilo