[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DocView: desktop starts PDF/PS conversion process
From: |
Tassilo Horn |
Subject: |
Re: DocView: desktop starts PDF/PS conversion process |
Date: |
Fri, 04 Jan 2008 14:49:10 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) |
Juri Linkov <address@hidden> writes:
Hi Juri,
>>> What would be a good solution? Maybe to add `doc-view-mode' to
>>> `desktop-modes-not-to-save'?
>>
>> No, that shouldn't be needed. AFAIK desktop saves the files you were
>> looking at when closing emacs, and on startup it reopens them, right?
>> So when reopening a pdf that was already converted before, it should
>> use the cached files. Is it possible that you accidentially deleted
>> them?
>
> Of course, a cache is not something permanent, e.g. on many systems
> rebooting deletes all files in the /tmp directory where the doc-view
> cache is saved.
On those systems I'd suggest to set `doc-view-cache-directory' to some
directory that won't be deleted automatically.
>> Basically there should be no difference in `C-x C-f foo.pdf' and
>> desktop opening it. Does a conversion start when you open a pdf with
>> find-file for the second time?
>
> As I mentioned above, using a cache is not a solution for this
> problem. What do you think about saving in the desktop file not the
> major mode doc-view-mode, but its minor mode that instead of
> displaying the rendered image displays the source text?
Basically that might be a good idea. I had a short look at desktop.el
and it seems you can add a custom handler for restoring a buffer that
was in a special major-/minor-mode: desktop-buffer-mode-handlers and
desktop-minor-mode-handlers.
Dired and Info make use of the former, so these can act as examples.
Currently I don't have the time to implement it, so feel free to give it
a go.
Bye,
Tassilo