emacs-devel
[Top][All Lists]
Advanced

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

Re: Displaying MIME parts internally/externally in Gnus


From: Reiner Steib
Subject: Re: Displaying MIME parts internally/externally in Gnus
Date: Thu, 04 May 2006 13:01:29 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

On Thu, May 04 2006, Katsumi Yamaoka wrote:

>>>>>>  Reiner Steib <address@hidden> wrote:
>
>> I will apply Stefan's changes in the trunk now.  Unless you object, I
>> will apply both to v5-10 / Emacs-CVS as well.
>
> Well, how should we change the `mm-inlinable-p' function?
>
> In gnus-mime-view-part-internally:
> gnus-art.el:4740:30:Warning: mm-inlinable-p called with 2 arguments, but
>     accepts only 1

It is this hunk in Stefan's patch:

--8<---------------cut here---------------start------------->8---
@@ -4467,13 +4475,16 @@
         (mm-inline-large-images t)
         (mail-parse-charset gnus-newsgroup-charset)
         (mail-parse-ignored-charsets
-         (save-excursion (set-buffer gnus-summary-buffer)
+          (with-current-buffer gnus-summary-buffer
                          gnus-newsgroup-ignored-charsets))
         (inhibit-read-only t))
+    (if (not (mm-inlinable-p handle))
+        (gnus-mime-view-part-as-type
+         nil (lambda (type) (mm-inlinable-p handle type)))
     (when handle
       (if (mm-handle-undisplayer handle)
          (mm-remove-part handle)
-       (mm-display-part handle)))))
+          (mm-display-part handle))))))

 (defun gnus-mime-action-on-part (&optional action)
   "Do something with the MIME attachment at \(point\)."
--8<---------------cut here---------------end--------------->8---

In `mm-inlinable-p', TYPE is the value of (mm-handle-media-type handle):

--8<---------------cut here---------------start------------->8---
(defun mm-inlinable-p (handle)
  "Say whether HANDLE can be displayed inline."
  (let ((alist mm-inline-media-tests)
        (type (mm-handle-media-type handle))
        test)
    (while alist
      (when (string-match (caar alist) type)
        (setq test (caddar alist)
              alist nil)
        (setq test (funcall test handle)))
      (pop alist))
    test))
--8<---------------cut here---------------end--------------->8---

Stefan, maybe you forgot to send a patch for `mm-decode.el' as well?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

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