unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5118: DocView: copy/search text
@ 2009-12-04  0:03 Juri Linkov
  2009-12-05  8:59 ` Kevin Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2009-12-04  0:03 UTC (permalink / raw)
  To: bug-gnu-emacs

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/






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5118: DocView: copy/search text
  2009-12-04  0:03 bug#5118: DocView: copy/search text Juri Linkov
@ 2009-12-05  8:59 ` Kevin Rodgers
  2009-12-05 19:47   ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Rodgers @ 2009-12-05  8:59 UTC (permalink / raw)
  To: bug-gnu-emacs

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







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5118: DocView: copy/search text
  2009-12-05  8:59 ` Kevin Rodgers
@ 2009-12-05 19:47   ` Juri Linkov
  2009-12-05 21:12     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2009-12-05 19:47 UTC (permalink / raw)
  To: Kevin Rodgers; +Cc: 5118, Tassilo Horn

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5118: DocView: copy/search text
  2009-12-05 19:47   ` Juri Linkov
@ 2009-12-05 21:12     ` Stefan Monnier
  2009-12-05 23:21       ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2009-12-05 21:12 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 5118, Tassilo Horn, Kevin Rodgers

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5118: DocView: copy/search text
  2009-12-05 21:12     ` Stefan Monnier
@ 2009-12-05 23:21       ` Juri Linkov
  0 siblings, 0 replies; 5+ messages in thread
From: Juri Linkov @ 2009-12-05 23:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5118, Tassilo Horn, Kevin Rodgers

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-05 23:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04  0:03 bug#5118: DocView: copy/search text Juri Linkov
2009-12-05  8:59 ` Kevin Rodgers
2009-12-05 19:47   ` Juri Linkov
2009-12-05 21:12     ` Stefan Monnier
2009-12-05 23:21       ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).