help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Viewing PDFs as text?


From: Bastien
Subject: Re: Viewing PDFs as text?
Date: Thu, 13 Mar 2008 03:37:48 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Hi Tassilo,

Tassilo Horn <tassilo@member.fsf.org> writes:

>> Of course, not all pdf files are such that pdftotext can give
>> meaningful results. Figures and, say, formulas in a file generated
>> with pdflatex will be screwed up. However, fairly often I need to use
>> a tty. Anything that helps me along that way is greatly
>> appreciated. For me, one of the big advantages of emacs is that it
>> allows me to get the most out of a plain old tty.
>
> In emacs from the current CVS I've added a new binding C-c C-t in
> doc-view-mode which opens the text of the current doc in a new buffer.
> When on a tty a message mentions that.

Thanks for this! 

I tried it and found this problem: when the buffer is already converted
C-c C-t on it will fail because it tries to create a directory that does
already exist.

,----
| (defun doc-view-doc->txt (txt callback)
|   "Convert the current document to text and call CALLBACK when done."
|   (make-directory (doc-view-current-cache-dir))
`----

A check before making this directory is enough to make it work ok here,
but you know the code better than I do. 

HTH,

-- 
Bastien




reply via email to

[Prev in Thread] Current Thread [Next in Thread]