Subject: bug#5118: DocView: copy/search text

From: Juri Linkov <[email-masked]>
Date: Sun, 06 Dec 2009 01:21:00 +0200

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