[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DocView: process ps->pdf changed status to killed.
From: |
Tassilo Horn |
Subject: |
Re: DocView: process ps->pdf changed status to killed. |
Date: |
Tue, 21 Oct 2014 16:54:47 +0200 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> The problem is that if your emacs doesn't satisfy the doc-view
>> requirements (PNG support, graphical frame, conversion utilities) but
>> you have pdf2text installed, then you're asked if you want to view the
>> document as plain text instead. If you say yes, then doc-view will
>> start a process to do the conversion.
>> But right after starting that process, `doc-view-toggle-display' is
>> called which will kill all running doc-view processes (including the
>> conversion to TXT) and put the document's buffer back in its normal
>> editing mode. That's why you've got the message that the process was
>> killed.
>
> It seems like it's an error to put the "put the document's buffer back
> in its normal editing mode" if the user agreed to "view the document
> as plain text". IOW the core of the problem might be that we
> shouldn't call `doc-view-toggle-display' in that case?
No, I don't think so. For example, visit a postscript document in a
terminal so that doc-view cannot do its normal workings. Do M-x
doc-view-mode RET. Now you're told that this won't work and if you want
to view the doc's text instead. Say yes. In the meantime, the original
buffer has switched doc-view-mode which means read-only, no font-lock,
etc.
Since `doc-view-toggle-display' is called, the original buffer will be
switched back to `ps-mode'. If we'd omit that, the buffer would stay in
doc-view-mode and basically be useless.
> I don't understand why running the process synchronously helps, and it
> sounds like a workaround rather than a fix.
The text contents of the document are opened in a separate buffer, not
in the buffer of the original document. By doing the conversion
synchronously the switching back from doc-view-mode to, say, ps-mode in
the original buffer is deferred until that conversion has finished (and
thus all the doc-view buffer local variables aren't needed anymore).
Bye,
Tassilo
- Re: DocView: process ps->pdf changed status to killed., (continued)
- Re: DocView: process ps->pdf changed status to killed., Pierre Lorenzon, 2014/10/03
- Re: DocView: process ps->pdf changed status to killed., Pierre Lorenzon, 2014/10/04
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/04
- Re: DocView: process ps->pdf changed status to killed., Pierre Lorenzon, 2014/10/07
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/07
- Re: DocView: process ps->pdf changed status to killed., Pierre Lorenzon, 2014/10/18
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/19
- Re: DocView: process ps->pdf changed status to killed., Stefan Monnier, 2014/10/19
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/21
- Re: DocView: process ps->pdf changed status to killed., Stefan Monnier, 2014/10/21
- Re: DocView: process ps->pdf changed status to killed.,
Tassilo Horn <=
- Message not available
- Re: DocView: process ps->pdf changed status to killed., Stefan Monnier, 2014/10/21
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/21
- Re: DocView: process ps->pdf changed status to killed., Stefan Monnier, 2014/10/21
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/22
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/22
- Re: DocView: process ps->pdf changed status to killed., Stefan Monnier, 2014/10/22
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/22
- Re: DocView: process ps->pdf changed status to killed., Pierre Lorenzon, 2014/10/23
- Re: DocView: process ps->pdf changed status to killed., Tassilo Horn, 2014/10/23
- Re: DocView: process ps->pdf changed status to killed., Stefan Monnier, 2014/10/23