From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Displaying MIME parts internally/externally in Gnus
Date: Thu, 04 May 2006 08:04:59 -0400 [thread overview]
Message-ID: <87vesmj8wr.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <v9r73ayrxy.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Thu, 04 May 2006 13:01:29 +0200")
> 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.
Sorry 'bout that.
Stefan
--- orig/lisp/gnus/mm-decode.el
+++ mod/lisp/gnus/mm-decode.el
@@ -562,7 +562,7 @@
description)
(setq type (split-string (car ctl) "/"))
(setq subtype (cadr type)
- type (pop type))
+ type (car type))
(setq
result
(cond
@@ -641,16 +641,15 @@
(defun mm-copy-to-buffer ()
"Copy the contents of the current buffer to a fresh buffer."
- (save-excursion
(let ((obuf (current-buffer))
beg)
(goto-char (point-min))
(search-forward-regexp "^\n" nil t)
(setq beg (point))
- (set-buffer
+ (with-current-buffer
;; Preserve the data's unibyteness (for url-insert-file-contents).
(let ((default-enable-multibyte-characters (mm-multibyte-p)))
- (generate-new-buffer " *mm*")))
+ (generate-new-buffer " *mm*"))
(insert-buffer-substring obuf beg)
(current-buffer))))
@@ -701,7 +701,8 @@
(forward-line 1)
(mm-insert-inline handle (mm-get-part handle))
'inline)
- (if (and method ;; If nil, we always use "save".
+ (setq external
+ (and method ;; If nil, we always use "save".
(stringp method) ;; 'mailcap-save-binary-file
(or (eq mm-enable-external t)
(and (eq mm-enable-external 'ask)
@@ -714,9 +715,7 @@
(concat
" \"" (format method filename) "\"")
"")
- "? ")))))
- (setq external t)
- (setq external nil))
+ "? "))))))
(if external
(mm-display-external
handle (or method 'mailcap-save-binary-file))
@@ -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)
next prev parent reply other threads:[~2006-05-04 12:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 2:42 Displaying MIME parts internally/externally in Gnus Stefan Monnier
2005-12-02 15:11 ` Stefan Monnier
[not found] ` <m31wvwgt0w.fsf@quimbies.gnus.org>
[not found] ` <873bgcns63.fsf-monnier+emacs@gnu.org>
[not found] ` <m3mzekdxn0.fsf@quimbies.gnus.org>
[not found] ` <jwvwtdomay3.fsf-monnier+emacs@gnu.org>
[not found] ` <m3vet8p2w4.fsf@quimbies.gnus.org>
2006-05-03 14:01 ` Reiner Steib
2006-05-03 16:36 ` Lars Magne Ingebrigtsen
2006-05-03 23:32 ` Katsumi Yamaoka
2006-05-04 11:01 ` Reiner Steib
2006-05-04 12:04 ` Stefan Monnier [this message]
2006-05-04 12:43 ` Reiner Steib
2006-05-04 15:18 ` Stefan Monnier
2006-05-06 12:42 ` Reiner Steib
2005-12-02 16:27 ` Reiner Steib
2005-12-02 21:28 ` Stefan Monnier
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=87vesmj8wr.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.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 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).