emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: emacs-orgmode@gnu.org
Subject: Re: doc-view-mode
Date: Thu, 13 Aug 2009 13:11:00 +0200	[thread overview]
Message-ID: <87my64m0jf.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: 87y6po3bzn.fsf@telefonica.net

Óscar Fuentes <ofv@wanadoo.es> writes:

> As said above, instantaneous response is not required for me. 

For most users, it is.  I open a doc and then I usually use PageDown to
go to the page I want (if it's not too far back).  If each PageDown
would start a new conversion, that would be damn slow.

Also, searching with C-s (followed by more C-s like in isearch) would be
hard.

> The problem with converting all the document to image files is that I
> often open large pdf's (several thousand pages) and small/medium
> dynamically generated pdf's. This would create tens of thousands of
> image files on a busy day (no exaggerating) which would require
> several gigabytes.

Well, here's a workaround for your situation.  Let's say foo.pdf
contains 5000 pages, and you only want to see page 2500.

  1. Open it; doc-view starts conversion from page 1
  2. Hit M-g M-g 2500 RET; conversion stops and restarts at page 2500
     which will be displayed to you
  3. Hit K to kill the further conversion
  4. Now, only page 2500 (and the few following pages that where
     converted) will be accessible

> IMHO, a user-configurable switch for "render this page and delete it
> before rendering the next" would be okay. More advanced options like
> keeping just the last N recently viewed pages of M documents (plus the
> succesive page of the current one) would be nice too, but if
> doc-view-mode supported the simple one-page option, it would be fine
> for me.

I think that would add quite much complexity for not too much gain.
Basically, the overall conversion approach would need to be changed and
searching and other stuff would need to be adapted...

> P.D.:
>
> After some experimentation with doc-view it seems to me that the file
> image cache system is flawed: open a large pdf file -> doc-view starts
> conversion -> enlarge -> doc-view cancels previous conversion, throws
> away the files, and starts a new one -> shring -> cancel, throw and
> restart again, etc -> close the pdf view -> open the same pdf view ->
> if the cache I guess you thought that creating separate caches for
> every new zoom level would be too much caching :-)

Yep.

> It seems there is a bug: open a large pdf -> before the conversion
> ends, kill the buffer -> open the pdf again -> the conversion is not
> resumed, only those pages converted on the previous session are
> accesible.

Yes, I know.  That's because ghostscript has no option to check the
number of pages in a pdf/ps file...  So the best you can do is to clear
the page in that case...

Bye,
Tassilo

  reply	other threads:[~2009-08-13 11:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12 18:25 [ANN] org-docview.el - Link to PDF files from org-mode Jan Böcker
2009-08-12 18:45 ` Leo
2009-08-12 19:30   ` doc-view-mode (was: Re: [ANN] org-docview.el - Link to PDF files from org-mode) Óscar Fuentes
2009-08-12 19:45     ` Leo
2009-08-12 20:28       ` doc-view-mode Óscar Fuentes
2009-08-12 21:19     ` doc-view-mode Tassilo Horn
2009-08-12 22:26       ` doc-view-mode Óscar Fuentes
2009-08-13 11:11         ` Tassilo Horn [this message]
2009-08-12 21:33   ` Re: [ANN] org-docview.el - Link to PDF files from org-mode Carsten Dominik
2009-08-12 23:50     ` Leo

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87my64m0jf.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=emacs-orgmode@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).