From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72241: 31.0.50; [PATCH] Use a dedicated buffer for `doc-view-open-text' Date: Tue, 23 Jul 2024 14:00:03 +0200 Message-ID: <87frs0b9oc.fsf@ledu-giraud.fr> References: <87jzhd4ysy.fsf@ledu-giraud.fr> <87v80xwb3d.fsf@gnu.org> <86le1t9t5p.fsf@gnu.org> <87r0blw9s5.fsf@gnu.org> <87a5i8jzpj.fsf@ledu-giraud.fr> <87ttggl7dk.fsf@gnu.org> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15900"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 72241@debbugs.gnu.org To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 23 14:02:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sWEDX-0003wT-Qg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Jul 2024 14:02:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWECX-0001DK-Er; Tue, 23 Jul 2024 08:01:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWECQ-0000qo-5N for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:00:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWECP-0000SQ-RP for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:00:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWECU-0004hH-75 for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2024 12:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72241 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72241-submit@debbugs.gnu.org id=B72241.172173601717997 (code B ref 72241); Tue, 23 Jul 2024 12:01:02 +0000 Original-Received: (at 72241) by debbugs.gnu.org; 23 Jul 2024 12:00:17 +0000 Original-Received: from localhost ([127.0.0.1]:59384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWEBl-0004gC-4Z for submit@debbugs.gnu.org; Tue, 23 Jul 2024 08:00:17 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:6672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWEBf-0004fy-Sv for 72241@debbugs.gnu.org; Tue, 23 Jul 2024 08:00:15 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=XiCfD89/ Qnhr0wo5VHzuckwMHI8WSFx6CuEAnyTOfT8=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=bdCcsXsYwIvgHgY8Z8op/wRPkHrD+r ru6ayl1+yUj2wC6VZ8EII4B86vQzDMSOhD3xIG3ya3FKh8qCqp2HT/Aw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=XiCfD89/Qnhr0wo5 VHzuckwMHI8WSFx6CuEAnyTOfT8=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=SFwqzpLVXhiJf3yEp4JL3yxpax4frLPIaip3j/ FwhCxgtDjV9tDUizQO38hDlxNxcV0BbzI+3JUQVm7+3xmMoBjHYnaZVfUFnxfntvfTcgPC wjysKaX1h0dq8elcVhbaIVj3Kcw0WnVStk9oh0hGcRZgF7nynjAWDzM+s4puXbZvYjX1lq SpfyOy80Ui0U5wHJ/+w5neX9cLBt3n9Dm2ZQ4MjCu68TWN79UXYw4Hc6YN6ot3QZMdy/ok SWMHLQ33UuG2F34OG7iJhMspdDw1FOHQE9SgKezVBoIDmxlrkABI7d+wcUPLKW78tZ8JoG dgJpVGq/myCGr36CqR/kbbJA== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 318935e3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 23 Jul 2024 14:00:04 +0200 (CEST) In-Reply-To: <87ttggl7dk.fsf@gnu.org> (Tassilo Horn's message of "Tue, 23 Jul 2024 12:39:35 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289160 Archived-At: Tassilo Horn 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