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

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Mon, 22 Jul 2024 08:28:01 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 72241 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 72241 <at> debbugs.gnu.org
Subject: Re: bug#72241: 31.0.50; [PATCH] Use a dedicated buffer for
 `doc-view-open-text'
Date: Tue, 23 Jul 2024 14:00:03 +0200
Tassilo Horn <tsdh <at> gnu.org> writes:

[...]

>> Maybe while here, we should clarify how DocView cycles through those 3
>> view: display, edit and text.  Or maybe, there is no 3-states cycling
>> and the "text contents" view is just considered a "side" view.  WDYT?
>
> 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

Your state machine is what my patch gives you.

[...]

> 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.

> 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.
-- 
Manuel Giraud




This bug report was last modified 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.