bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5102: 23.1; doc-view on a buffer not linked to a file


From: Tassilo Horn
Subject: bug#5102: 23.1; doc-view on a buffer not linked to a file
Date: Fri, 04 Dec 2009 23:43:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Juri Linkov <juri@jurta.org> writes:

Hi Juri,

>> There is a problem when trying to display postscript code
>> in a ps-mode buffer if the buffer is not linked to a file.
>>
>> Starting with emacs -Q,
>> - open a new buffer,
>> - insert in that buffer the content of a postscript file,
>> - start ps-mode.
>> Now if we type C-c C-c to view the postscript, we are prompted whether
>> we want to save the content of the buffer. If we answer "no", we get the 
>> error
>>
>> Wrong type argument: stringp, nil
>>
>> Message buffer reports that this was issued by doc-view-mode.
>
> With `debug-on-error' enabled it displays:
>
>   Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>     file-readable-p(nil)
>     doc-view-mode()
>     doc-view-toggle-display()
>     call-interactively(doc-view-toggle-display nil nil)
>
> Tassilo, please tell whether DocView is designed to work in non-file
> buffers?

No, it cannot handle non-file buffers, because ghostscript and friends
only handle input files and don't support piping in the output.  So the
best we could do was to autosave to a temp directory.  But that might be
wrong with respect to security issues.  So I think asking the user to
save is the best we can do.  Of course, an explanatory message would be
better than an error.

Bye,
Tassilo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]