From: Florian Weimer <fw@deneb.enyo.de>
Subject: Disable mailcap support
Date: Sun, 28 Sep 2003 18:11:39 +0200 [thread overview]
Message-ID: <20030928161139.GA31465@deneb.enyo.de> (raw)
After some discussion with RMS after he posted
<mailman.944.1061837187.29551.info-gnu@gnu.org>, we have come to the
conclusion that it might be a good idea to disable mailcap processing.
Reiner Steib kindly wrote the patch reproduced, which makes Gnus'
behavior more configurable.
I'd like to see 'mm-enable-external' disabled in the default
configuration, but my judgement in such matters is typically quite
drastic. Comments?
--- mm-decode.el.~6.94.~ Thu Aug 28 11:06:58 2003
+++ mm-decode.el Mon Sep 22 22:42:34 2003
@@ -151,6 +151,18 @@
:type 'boolean
:group 'mime-display)
+(defcustom mm-enable-external t
+ "Indicate if external MIME handlers should be used.
+
+If t, all defined external MIME handlers are used. If nil, files are saved by
+`mailcap-save-binary-file'. If it is the symbol `ask', you are prompted
+before the external MIME handler is invoked."
+ :version "21.4"
+ :type '(choice (const :tag "Always" t)
+ (const :tag "Never" nil)
+ (const :tag "Ask" ask))
+ :group 'mime-display)
+
(defcustom mm-inline-media-tests
'(("image/jpeg"
mm-inline-image
@@ -619,7 +631,12 @@
(if (mm-handle-displayed-p handle)
(mm-remove-part handle)
(let* ((type (mm-handle-media-type handle))
- (method (mailcap-mime-info type)))
+ (method (mailcap-mime-info type))
+ (filename (or (mail-content-type-get
+ (mm-handle-disposition handle) 'filename)
+ (mail-content-type-get
+ (mm-handle-type handle) 'name)
+ "<file>")))
(if (and (mm-inlinable-p handle)
(mm-inlined-p handle))
(progn
@@ -634,8 +651,20 @@
(forward-line 1)
(mm-insert-inline handle (mm-get-part handle))
'inline)
- (mm-display-external
- handle (or method 'mailcap-save-binary-file)))))))))
+ (cond
+ ((eq mm-enable-external 'ask)
+ (if (and method
+ (y-or-n-p (concat
+ "Display part using external program `"
+ (format method filename) "'? ")))
+ (mm-display-external handle method)
+ (mm-display-external handle 'mailcap-save-binary-file)))
+ (mm-enable-external
+ (mm-display-external
+ handle (or method 'mailcap-save-binary-file)))
+ (t
+ (mm-display-external
+ handle 'mailcap-save-binary-file))))))))))
(defun mm-display-external (handle method)
"Display HANDLE using METHOD."
next reply other threads:[~2003-09-28 16:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-28 16:11 Florian Weimer [this message]
2003-09-28 22:56 ` Jesper Harder
2003-09-29 18:04 ` Florian Weimer
2003-09-29 21:47 ` Jesper Harder
2003-11-09 15:35 ` Florian Weimer
2004-01-03 19:28 ` Reiner Steib
2003-09-29 19:35 ` Reiner Steib
2003-09-29 21:27 ` Jesper Harder
2003-09-30 18:04 ` Reiner Steib
2003-09-30 23:37 ` Jesper Harder
2003-10-02 18:02 ` Reiner Steib
2003-10-02 22:25 ` Jesper Harder
2003-10-03 18:10 ` Reiner Steib
2003-10-17 17:17 ` Lars Magne Ingebrigtsen
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=20030928161139.GA31465@deneb.enyo.de \
--to=fw@deneb.enyo.de \
/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.
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 NNTP newsgroup(s).