From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Displaying MIME parts internally/externally in Gnus Date: Thu, 04 May 2006 14:43:51 +0200 Message-ID: References: <87irum4tka.fsf-monnier+emacs@gnu.org> <8764q7lenq.fsf-monnier+emacs@gnu.org> <873bgcns63.fsf-monnier+emacs@gnu.org> <87vesmj8wr.fsf-monnier+emacs@gnu.org> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146746698 32491 80.91.229.2 (4 May 2006 12:44:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 May 2006 12:44:58 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 04 14:44:55 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FbdCE-0005X8-F0 for ged-emacs-devel@m.gmane.org; Thu, 04 May 2006 14:44:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbdCD-0002KV-G7 for ged-emacs-devel@m.gmane.org; Thu, 04 May 2006 08:44:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbdBa-00026u-4M for emacs-devel@gnu.org; Thu, 04 May 2006 08:44:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbdBY-00026O-LY for emacs-devel@gnu.org; Thu, 04 May 2006 08:44:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbdBY-00026J-8y for emacs-devel@gnu.org; Thu, 04 May 2006 08:44:00 -0400 Original-Received: from [134.60.1.1] (helo=mail.uni-ulm.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FbdC9-0007pV-FE for emacs-devel@gnu.org; Thu, 04 May 2006 08:44:37 -0400 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by mail.uni-ulm.de (8.13.6/8.13.6) with ESMTP id k44ChpMh012121; Thu, 4 May 2006 14:43:51 +0200 (MEST) Original-Received: by bridgekeeper.physik.uni-ulm.de (Postfix, from userid 170) id 86BC5118A0; Thu, 4 May 2006 14:43:51 +0200 (CEST) Original-To: Stefan Monnier X-Face: 3Phac&+dw=IZHjhua]bp}LH<*p{qzj8u+ List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53899 gmane.emacs.gnus.general:63163 Archived-At: On Thu, May 04 2006, Stefan Monnier wrote: >> In `mm-inlinable-p', TYPE is the value of (mm-handle-media-type handle): > [...] >> Stefan, maybe you forgot to send a patch for `mm-decode.el' as well? > > Oops, looks like you're right. The patch is the obvious one. Thanks. Could you provide a ChangeLog entry, please? AFAICS, the first two hunks are unrelated (maybe the ChangeLog entry will clarify). For the `gnus-art.el' changes, I've added the following. Feel free to suggest a better entry. --8<---------------cut here---------------start------------->8--- 2006-05-03 Stefan Monnier * gnus-art.el (gnus-mime-view-part-as-type): Add optional PRED argument. (gnus-mime-view-part-externally, gnus-mime-view-part-internally): Try harder to show the attachment internally or externally using gnus-mime-view-part-as-type. --8<---------------cut here---------------end--------------->8--- > @@ -1019,10 +1017,10 @@ > methods nil))) > result)) > > -(defun mm-inlinable-p (handle) > +(defun mm-inlinable-p (handle &optional type) > "Say whether HANDLE can be displayed inline." > + (unless type (setq type (mm-handle-media-type handle))) > (let ((alist mm-inline-media-tests) > - (type (mm-handle-media-type handle)) > test) > (while alist > (when (string-match (caar alist) type) IMHO, the doc string should explain the use of TYPE, i.e. if TYPE is given, HANDLE is ignored. BTW, I did some test with *.pdf and *.png files attached as application/octet-stream. Using `e', I get "View as MIME type (default image/png)" but TAB doesn't offer me any completion. Maybe an addition to (info "(gnus)Using MIME") for `e' and `E' would be useful. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/