* DocView: desktop starts PDF/PS conversion process
@ 2008-01-03 23:18 Juri Linkov
2008-01-04 8:37 ` Tassilo Horn
0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2008-01-03 23:18 UTC (permalink / raw)
To: emacs-pretest-bug; +Cc: Tassilo Horn
When a PDF/PS file gets saved in the desktop file, then after starting
Emacs and reading this PDF/PS file, DocView starts a PDF/PS conversion
process. This is annoying behavior, because for an unknown reason
the CPU goes high and you need investigating what really happens.
What would be a good solution? Maybe to add `doc-view-mode' to
`desktop-modes-not-to-save'?
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DocView: desktop starts PDF/PS conversion process
2008-01-03 23:18 DocView: desktop starts PDF/PS conversion process Juri Linkov
@ 2008-01-04 8:37 ` Tassilo Horn
2008-01-04 9:57 ` Juri Linkov
0 siblings, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2008-01-04 8:37 UTC (permalink / raw)
To: emacs-devel
Juri Linkov <juri@jurta.org> writes:
Hi Juri,
> When a PDF/PS file gets saved in the desktop file, then after starting
> Emacs and reading this PDF/PS file, DocView starts a PDF/PS conversion
> process. This is annoying behavior, because for an unknown reason
> the CPU goes high and you need investigating what really happens.
I don't use desktop, so could you give me a recipe?
> 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?
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?
Bye,
Tassilo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DocView: desktop starts PDF/PS conversion process
2008-01-04 8:37 ` Tassilo Horn
@ 2008-01-04 9:57 ` Juri Linkov
2008-01-04 13:49 ` Tassilo Horn
0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2008-01-04 9:57 UTC (permalink / raw)
To: emacs-devel
>> When a PDF/PS file gets saved in the desktop file, then after starting
>> Emacs and reading this PDF/PS file, DocView starts a PDF/PS conversion
>> process. This is annoying behavior, because for an unknown reason
>> the CPU goes high and you need investigating what really happens.
>
> I don't use desktop, so could you give me a recipe?
Just enable the desktop mode, visit a PDF file and reopen emacs.
>> 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.
> 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? In this case, restoring the desktop
doesn't start the conversion process, and when the user wants to view
the rendered document in the restored buffer (and start the conversion process),
this is easy to do by typing `C-c C-c'.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DocView: desktop starts PDF/PS conversion process
2008-01-04 9:57 ` Juri Linkov
@ 2008-01-04 13:49 ` Tassilo Horn
0 siblings, 0 replies; 4+ messages in thread
From: Tassilo Horn @ 2008-01-04 13:49 UTC (permalink / raw)
To: emacs-devel
Juri Linkov <juri@jurta.org> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-04 13:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03 23:18 DocView: desktop starts PDF/PS conversion process Juri Linkov
2008-01-04 8:37 ` Tassilo Horn
2008-01-04 9:57 ` Juri Linkov
2008-01-04 13:49 ` Tassilo Horn
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.