unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 17985-close@debbugs.gnu.org
Subject: bug#17985: 24.3.92; doc-view-open-text raises wrong-type-argument error
Date: Mon, 28 Jul 2014 11:10:06 +0200	[thread overview]
Message-ID: <87d2cpg87l.fsf@gnu.org> (raw)
In-Reply-To: <87r41twgb9.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Thu, 10 Jul 2014 14:26:18 +0200")

Stephen Berman <stephen.berman@gmx.net> writes:

> If I'm using Gnus to read mail with an attachment, I can type `c' on
> the attachment to view it in another buffer, and if the attachment is
> something that Doc View can handle, I can type `C-c C-c' in the buffer
> to view the rendered image of the attachment.  But if I then type `C-c
> C-t' (doc-view-open-text) to view the ascii text of the attachment, I
> get this error:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   file-name-nondirectory(nil)
>   doc-view-open-text()
>   call-interactively(doc-view-open-text nil nil)
>   command-execute(doc-view-open-text)
>
> The reason is that Doc View expects the buffer to be visiting a file.
> But with an mail attachment, that does not have to be the case (when I
> type `C-c C-c', Doc View says: "The buffer has been modified.  Save the
> changes? (y or n)", but if I answer "n", it still renders the image).
> The following patch lets me view the ascii text whether or not the
> buffer containing the document is visiting a file.  (The patch is
> against emacs-24; the error also happens in trunk.)

Thanks, I've committed it on the trunk.  (As it's not a regression, I
don't think it should go in emacs-24.)

,----
| revno: 117599
| author: Stephen Berman  <stephen.berman@gmx.net>
| committer: Tassilo Horn <tsdh@gnu.org>
| branch nick: trunk
| timestamp: Mon 2014-07-28 11:07:56 +0200
| message:
|   Open doc text also if it's not saved to a file.
|   
|   * doc-view.el (doc-view-open-text): Don't require that the
|   document is saved in a file (e.g., email attachment).
`----

Bye,
Tassilo





  reply	other threads:[~2014-07-28  9:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 12:26 bug#17985: 24.3.92; doc-view-open-text raises wrong-type-argument error Stephen Berman
2014-07-28  9:10 ` Tassilo Horn [this message]
2014-07-28  9:21   ` Eli Zaretskii
2014-07-28  9:33     ` Tassilo Horn
2014-07-28 10:07       ` Stephen Berman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87d2cpg87l.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=17985-close@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).