all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Juri Linkov <juri@jurta.org>
Cc: 5102@emacsbugs.donarmstrong.com, harven <harven@free.fr>
Subject: bug#5102: 23.1; doc-view on a buffer not linked to a file
Date: Fri, 04 Dec 2009 23:43:56 +0100	[thread overview]
Message-ID: <87zl5ygy1f.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <87bpiezfov.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 04 Dec 2009 23:50:20 +0200")

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	other threads:[~2009-12-04 22:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <jwv638i610l.fsf-monnier+emacsbugreports@gnu.org>
2009-12-02 12:17 ` bug#5102: 23.1; doc-view on a buffer not linked to a file harven
2009-12-04 21:50   ` Juri Linkov
2009-12-04 22:43     ` Tassilo Horn [this message]
2009-12-04 23:18       ` Drew Adams
2009-12-05 10:12         ` Tassilo Horn
2009-12-05 18:49       ` Stefan Monnier
2009-12-05 23:23         ` Juri Linkov
2009-12-07  2:38           ` Stefan Monnier
2009-12-07 17:51             ` Juri Linkov
2009-12-07 19:30   ` bug#5102: marked as done (23.1; doc-view on a buffer not linked to a file) Emacs bug Tracking System

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

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

  git send-email \
    --in-reply-to=87zl5ygy1f.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=5102@emacsbugs.donarmstrong.com \
    --cc=harven@free.fr \
    --cc=juri@jurta.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 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.