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#72305: [PATCH] Fix DocView's text conversion on tty Emacs Date: Sat, 27 Jul 2024 17:17:24 +0200 Message-ID: <871q3esw3f.fsf@ledu-giraud.fr> References: <878qxorw4k.fsf@ledu-giraud.fr> <87cymzakq7.fsf@jeremybryant.net> 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="18756"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 72305@debbugs.gnu.org To: Jeremy Bryant Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 27 17:18:19 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 1sXjBb-0004et-5M for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Jul 2024 17:18:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXjBL-0004C1-L1; Sat, 27 Jul 2024 11:18:04 -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 1sXjBE-00048Y-Ie for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 11:17:57 -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 1sXjBA-0001lQ-Jz for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 11:17:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=QvV8+VmhWQSGDLhdmSSImTBkv6qBHvW630J5vLnGalc=; b=K8Xlr4EtaiqaZBW2+b0VN05tU/2TV15L7dIwEo4utlL8X6MiuRxJc3jOAr1tmzdeDXY+LkJ9PgXvGbZz0TnnvsjatuXjHMWCgImNQS/Xn6kl3YPEzSPNuNKfKcdnuxSONeI/GHlPrFbx76Tz2zdX34V6KBO3DHakmhUXjeSBxGyRh5Py0O2zTfIAIwd0glyJ8GXgKxCGMHTFVu2Z99k6ItvyB42C12Cr8DgXWFSjNhObZ74JakLqfWZT03OQtA1ABWQb8RRdbP3zrLjCa6wu11WAILalY3pluVIgvWPyEjoZY2Gck140PP3xK7xtZ6mFaQmpFjHzk5SezGo59ccBEA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sXjBK-00025x-DV for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 11:18: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: Sat, 27 Jul 2024 15:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-Cc: "Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors" , 72305@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17220934688006 (code B ref -1); Sat, 27 Jul 2024 15:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jul 2024 15:17:48 +0000 Original-Received: from localhost ([127.0.0.1]:42119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXjB6-00024p-6y for submit@debbugs.gnu.org; Sat, 27 Jul 2024 11:17:48 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:44064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXjB1-00023K-3q for submit@debbugs.gnu.org; Sat, 27 Jul 2024 11:17:43 -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 1sXjAq-000403-LP for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 11:17:32 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXjAo-0001gw-Q1 for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 11:17:32 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=h8dy+2OA hhFAgco+fnjjALiopzaNfb1FCD1M9krVXRA=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=YG4kGJDZPY2YQ31/Fygpo4mD5XbaSy zILrSw57zc8ylsXkxkt/rJpFnzIfBzjuSF2TeVa6FB5HuELTIHS6FzBQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=h8dy+2OAhhFAgco+ fnjjALiopzaNfb1FCD1M9krVXRA=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=0Loq2+YaAbuP/0FkAVM7UFntVdbTH6V3Aizgpp iA9UImtNLVvYh/0I5OtF7D+dGA51GyOFlus2Xz3VTdAls/FbdZSTrPiAc4La5aQfMuuY+J iP8HiVqvlnOoeVNTgoYY39BcAmzSmqZjaNFExq689mHQOTqrAwRPzsid45MaAW6IFwXU3G phi0qqfeTs8taMoX3ycJSAdboZ6PfUAgvVv6AxTWRvxDxuAYRFkLmM8P+5nbupGxRAVdv6 fzE6Q7cdHGBa28N57qut+lbYjv5G4Uv5qYpnBW/a9mkx5udlwx2lzGlWqHYThEMDBtRZKU S6DNzq+Mesi1psbv9NtM3NHg== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 54e9b331 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 27 Jul 2024 17:17:27 +0200 (CEST) In-Reply-To: <87cymzakq7.fsf@jeremybryant.net> (Jeremy Bryant's message of "Fri, 26 Jul 2024 22:48:00 +0100") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:289433 Archived-At: Jeremy Bryant writes: > Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > >> Tags: patch >> >> Hi, >> >> When doing 'M-x doc-view-mode' on document buffer in "emacs -nw", Emacs >> proposes to convert this document to the text version and if the user >> says "yes" it calls `doc-view-open-text'. >> >> `doc-view-open-text' tries to get the current page by calling the >> `doc-view-current-page' but this latter relies on >> `image-mode-window-get' which most probably return nil on a tty. > > I can't reproduce this bug on 29.4, could you provide a more complete > recipe starting from emacs -Q? You're right but I see an error nevertheless. Here is my recipe: - emacs -Q -nw - C-x C-f "a_doc_for_example_a.pdf" - M-x doc-view-mode ;; No automatic mode detection (I think it ;; would be the object of another bug report) - Answer "y" to the question "Unable to render file. View extracted text instead? " Here I see an error in 29.4 but the text version is rendered anyway. In 30 (or master), I see an error and the text version is not rendered. -- Manuel Giraud