From unknown Fri Jun 13 10:41:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5118: DocView: copy/search text Reply-To: Juri Linkov , 5118@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: tassilo@member.fsf.org, Emacs Bugs , owner@debbugs.gnu.org 2Resent-Date: Fri, 04 Dec 2009 00:35:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 5118 X-Emacs-PR-Package: emacs,doc-view X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12598864758895 (code B ref -1); Fri, 04 Dec 2009 00:35:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Dec 2009 00:27:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.7 required=4.0 tests=AWL,HAS_PACKAGE,X_DEBBUGS_CC autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB40RqE6008891 for ; Thu, 3 Dec 2009 16:27:55 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGM1X-0001M7-RT for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2009 19:27:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGM1T-0001JA-L0 for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2009 19:27:51 -0500 Received: from [199.232.76.173] (port=37635 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGM1T-0001J4-Hi for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2009 19:27:47 -0500 Received: from smtp-out4.starman.ee ([85.253.0.6]:55406 helo=mx2.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGM1T-0005Hv-8l for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2009 19:27:47 -0500 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.30.124.cable.starman.ee [82.131.30.124]) by mx2.starman.ee (Postfix) with ESMTP id F248E3F40BF for ; Fri, 4 Dec 2009 02:27:36 +0200 (EET) From: Juri Linkov To: bug-gnu-emacs@gnu.org Organization: JURTA Date: Fri, 04 Dec 2009 02:03:19 +0200 Message-ID: <87hbs7bvbw.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Package: emacs,doc-view Severity: wishlist Please add two features that would be easy to implement: 1. Copying the text of the current page to the kill ring. PDF viewers allow selecting a rectangular area to copy it to the clipboard. If this is not possible in DocView, then at least copying the text of the whole page would be a satisfactory compensation. Info and Dired bind similar commands to `w'. 2. Search currently is useless in DocView since it doesn't highlight the current match. What would be more useful is to implement Occur-like UI. For instance, typing `doc-view-occur' would display an *Occur* buffer like: Page 1: text text match text text Page 1: text text text match text Page 1: text text text text match Page 2: text match text text text Page 42: match text text text text that allows to navigate to the corresponding page. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Fri Jun 13 10:41:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5118: DocView: copy/search text Reply-To: Kevin Rodgers , 5118@debbugs.gnu.org Resent-From: Kevin Rodgers Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org 2Resent-Date: Sat, 05 Dec 2009 09:10:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 5118 X-Emacs-PR-Package: emacs,doc-view X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.126000360426182 (code B ref -1); Sat, 05 Dec 2009 09:10:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 5 Dec 2009 09:00:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB5900E9026118 for ; Sat, 5 Dec 2009 01:00:03 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGqUi-0000xZ-DL for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2009 04:00:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGqUb-0000rd-7e for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2009 03:59:57 -0500 Received: from [199.232.76.173] (port=46603 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGqUb-0000ra-3B for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2009 03:59:53 -0500 Received: from lo.gmane.org ([80.91.229.12]:59891) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGqUa-0004xp-Mx for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2009 03:59:52 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NGqUW-0005UF-IK for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2009 09:59:48 +0100 Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Dec 2009 09:59:48 +0100 Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Dec 2009 09:59:48 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Kevin Rodgers Date: Sat, 05 Dec 2009 01:59:26 -0700 Lines: 19 Message-ID: References: <87hbs7bvbw.fsf@mail.jurta.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) In-Reply-To: <87hbs7bvbw.fsf@mail.jurta.org> Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Juri Linkov wrote: > Package: emacs,doc-view > Severity: wishlist > > Please add two features that would be easy to implement: > > 1. Copying the text of the current page to the kill ring. I don't know anything about DocView, but shouldn't that be possible in any major mode via C-x C-p (mark-page) then M-w (kill-ring-save)? > PDF viewers allow selecting a rectangular area to copy it to the > clipboard. If this is not possible in DocView, then at least copying > the text of the whole page would be a satisfactory compensation. > Info and Dired bind similar commands to `w'. -- Kevin Rodgers Denver, Colorado, USA From unknown Fri Jun 13 10:41:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5118: DocView: copy/search text Reply-To: Juri Linkov , 5118@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org 2Resent-Date: Sat, 05 Dec 2009 19:55:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 5118 X-Emacs-PR-Package: emacs,doc-view X-Emacs-PR-Keywords: Received: via spool by 5118-submit@emacsbugs.donarmstrong.com id=B5118.126004276122228 (code B ref 5118); Sat, 05 Dec 2009 19:55:11 +0000 Received: (at 5118) by emacsbugs.donarmstrong.com; 5 Dec 2009 19:52:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB5JqeWd022223 for <5118@emacsbugs.donarmstrong.com>; Sat, 5 Dec 2009 11:52:41 -0800 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.97.127.cable.starman.ee [82.131.97.127]) by mx1.starman.ee (Postfix) with ESMTP id 16E583F40E0; Sat, 5 Dec 2009 21:52:33 +0200 (EET) From: Juri Linkov To: Kevin Rodgers Cc: 5118@debbugs.gnu.org, Tassilo Horn Organization: JURTA References: <87hbs7bvbw.fsf@mail.jurta.org> Date: Sat, 05 Dec 2009 21:47:50 +0200 In-Reply-To: (Kevin Rodgers's message of "Sat, 05 Dec 2009 01:59:26 -0700") Message-ID: <87pr6te9tt.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Please add two features that would be easy to implement: >> >> 1. Copying the text of the current page to the kill ring. > > I don't know anything about DocView, but shouldn't that be possible > in any major mode via C-x C-p (mark-page) then M-w (kill-ring-save)? `C-x C-p' and `M-w' will copy binary data, whereas `pdftotext' converts it to plain text in a hidden buffer that can be displayed with `C-c C-t' where you can do `C-x C-p' and `M-w'. But the problem is that it's difficult to find the current page in the text representation to be able to copy it. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Fri Jun 13 10:41:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5118: DocView: copy/search text Reply-To: Stefan Monnier , 5118@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org 2Resent-Date: Sat, 05 Dec 2009 21:20:13 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 5118 X-Emacs-PR-Package: emacs,doc-view X-Emacs-PR-Keywords: Received: via spool by 5118-submit@emacsbugs.donarmstrong.com id=B5118.126004756932700 (code B ref 5118); Sat, 05 Dec 2009 21:20:13 +0000 Received: (at 5118) by emacsbugs.donarmstrong.com; 5 Dec 2009 21:12:49 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB5LCmDQ032692 for <5118@emacsbugs.donarmstrong.com>; Sat, 5 Dec 2009 13:12:49 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4EAOdbGktFpZ7i/2dsb2JhbACBS9MDhDMEih4 X-IronPort-AV: E=Sophos;i="4.47,347,1257138000"; d="scan'208";a="50759242" Received: from 69-165-158-226.dsl.teksavvy.com (HELO pastel.home) ([69.165.158.226]) by ironport2-out.pppoe.ca with ESMTP; 05 Dec 2009 16:12:42 -0500 Received: by pastel.home (Postfix, from userid 20848) id 45DCF80B1; Sat, 5 Dec 2009 16:12:42 -0500 (EST) From: Stefan Monnier To: Juri Linkov Cc: 5118@debbugs.gnu.org, Kevin Rodgers , Tassilo Horn Message-ID: References: <87hbs7bvbw.fsf@mail.jurta.org> <87pr6te9tt.fsf@mail.jurta.org> Date: Sat, 05 Dec 2009 16:12:42 -0500 In-Reply-To: <87pr6te9tt.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 05 Dec 2009 21:47:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>> Please add two features that would be easy to implement: >>> 1. Copying the text of the current page to the kill ring. >> I don't know anything about DocView, but shouldn't that be possible >> in any major mode via C-x C-p (mark-page) then M-w (kill-ring-save)? > `C-x C-p' and `M-w' will copy binary data, whereas `pdftotext' converts > it to plain text in a hidden buffer that can be displayed with `C-c C-t' > where you can do `C-x C-p' and `M-w'. But the problem is that it's > difficult to find the current page in the text representation to be able > to copy it. doc-view-search-internal seems to just count ^Ls, so assuming doc-view-search-internal works (which it appears to do), it shouldn't be that hard. Stefan From unknown Fri Jun 13 10:41:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#5118: DocView: copy/search text Reply-To: Juri Linkov , 5118@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , owner@debbugs.gnu.org 2Resent-Date: Sat, 05 Dec 2009 23:30:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 5118 X-Emacs-PR-Package: emacs,doc-view X-Emacs-PR-Keywords: Received: via spool by 5118-submit@emacsbugs.donarmstrong.com id=B5118.126005546815354 (code B ref 5118); Sat, 05 Dec 2009 23:30:11 +0000 Received: (at 5118) by emacsbugs.donarmstrong.com; 5 Dec 2009 23:24:28 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx2.starman.ee (smtp-out4.starman.ee [85.253.0.6]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB5NOQeI015343 for <5118@emacsbugs.donarmstrong.com>; Sat, 5 Dec 2009 15:24:27 -0800 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.97.127.cable.starman.ee [82.131.97.127]) by mx2.starman.ee (Postfix) with ESMTP id 20AE03F409B; Sun, 6 Dec 2009 01:24:19 +0200 (EET) From: Juri Linkov To: Stefan Monnier Cc: 5118@debbugs.gnu.org, Kevin Rodgers , Tassilo Horn Organization: JURTA References: <87hbs7bvbw.fsf@mail.jurta.org> <87pr6te9tt.fsf@mail.jurta.org> Date: Sun, 06 Dec 2009 01:21:00 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 05 Dec 2009 16:12:42 -0500") Message-ID: <87ein96nmz.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>> Please add two features that would be easy to implement: >>>> 1. Copying the text of the current page to the kill ring. >>> I don't know anything about DocView, but shouldn't that be possible >>> in any major mode via C-x C-p (mark-page) then M-w (kill-ring-save)? > >> `C-x C-p' and `M-w' will copy binary data, whereas `pdftotext' converts >> it to plain text in a hidden buffer that can be displayed with `C-c C-t' >> where you can do `C-x C-p' and `M-w'. But the problem is that it's >> difficult to find the current page in the text representation to be able >> to copy it. > > doc-view-search-internal seems to just count ^Ls, so assuming > doc-view-search-internal works (which it appears to do), it shouldn't be > that hard. I meant it's difficult for the user to find the current page (that is displayed in the image buffer) to find the corresponding page in the text buffer (with the output from `pdftotext'). I don't mind having a command that would switch from the image buffer to the text buffer and narrow it to the current page. So it would be easy to copy any text from the textual representation of the current page. -- Juri Linkov http://www.jurta.org/emacs/