all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Carlos Aguilar <carlos.aguilar@unilim.fr>
Cc: emacs-devel@gnu.org
Subject: Re: Suggestion / feature request
Date: Thu, 19 Apr 2012 18:21:52 -0400	[thread overview]
Message-ID: <jwv4nsf4be9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4F901313.5040804@unilim.fr> (Carlos Aguilar's message of "Thu, 19 Apr 2012 15:28:51 +0200")

> 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



  parent reply	other threads:[~2012-04-19 22:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 13:28 Suggestion / feature request Carlos Aguilar
2012-04-19 14:17 ` Tassilo Horn
2012-04-19 16:36   ` Carlos Aguilar
2012-04-19 17:15   ` Carlos Aguilar
2012-04-19 18:59     ` Tassilo Horn
2012-04-19 22:21 ` Stefan Monnier [this message]
2012-04-20 18:15   ` Tassilo Horn
2012-04-20 20:16     ` Stefan Monnier
2012-04-23  7:06       ` Carlos Aguilar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4nsf4be9.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=carlos.aguilar@unilim.fr \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.