[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggestion / feature request
From: |
Stefan Monnier |
Subject: |
Re: Suggestion / feature request |
Date: |
Thu, 19 Apr 2012 18:21:52 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
> I often use doc-view mode with medium to large pdf/ps/dvi files, when
> writing/modifying latex documents. Whether these are slides or a document
Not sure what we can do for dvi/ps files, but I use doc-view for my
LaTeXing with pdflatex and have bumped into the same problem.
My solution is that I changed doc-view-mode to compute PNG pages lazily,
so after changing the PDF file, auto-revert-mode will cause the
currently displayed page to be recomputed and the rest will be flushed
(and recomputed on the fly when you move forward/backward in the
document).
It slows down movement in the document (tho I also added a command to
force recomputing the whole document), but is very worthwhile in terms
of battery power and machine load.
Tassilo (doc-view maintainer) wasn't too excited by my change because it
makes doc-view more complex and it only works for pdf (and it has a few
other downsides, e.g. lazily converting pages means that we usually
don't know how many total pages there are; which I partly addressed by
adding a bit of Elisp code which parses the PDF to extract the
page-count info, but that only works for not-too-recent versions of
pdf, since more recent ones use compression in that data and I haven't
bothered to figure out how/if that can be handled from Elisp).
Stefan