[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Couple of useful (?) patches
- To: wl-en@lists.airs.net, emacs-mime-ja@m17n.org
- Subject: Re: Couple of useful (?) patches
- From: Vitaly Mayatskikh <v.mayatskih@gmail.com>
- Date: Sat, 09 Apr 2011 23:26:13 -0400
- Delivered-to: wl-en@lists.airs.net
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:message-id:from:to:subject:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=Rh+XeCFtyYVsn6gfpBlviceX9l7RBvHLen6lAwKg4Qg=; b=YfeQ1tk9vRv+CCmtLOeFlP8kmulXhb8ANTwvFhSSDlDiNfQeO3A2YMeaNLdeez805/ Wn1inomiPx/d3FOb0u8rQayGcvi014ZhLc72v2STJkyUa+nXJILA0Va4zkQQwaswQ4Ak PAzhfI3dXZiNvFbUhJ5Zh/vwmVppHLusQknPg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:subject:in-reply-to:references:user-agent :mime-version:content-type:content-transfer-encoding; b=HsjYn3n6v0lb9HDKohKXkkBIjbwx7C5SkGCUB/Mh4x2QPeGvcVhRidSMb6Fmy04WxS EkrHRdpEtoWqv+bbjWeOeD2S66DbW7auoOYAh3jcvJ+rhNqS4fxd+V/w3+yypSOxN1V4 aHooTE0UWQb2O4CHunSpJwgtJhHlratrn+0lk=
- In-reply-to: <871v1g2k8t.wl@gravicappa.localhost.localdomain>
- List-help: <mailto:wl-en-ctl@lists.airs.net?body=help>
- List-id: wl-en.lists.airs.net
- List-owner: <mailto:wl-en-admin@lists.airs.net>
- List-post: <mailto:wl-en@lists.airs.net>
- List-software: fml [fml stable 20011102.2100]
- List-unsubscribe: <mailto:wl-en-ctl@lists.airs.net?body=unsubscribe>
- References: <871v1g2k8t.wl@gravicappa.localhost.localdomain>
- Reply-to: wl-en@lists.airs.net
- User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/23.3 Mule/6.0 (HANACHIRUSATO)
Patches revised. mime-view-buttons-visible allows to render mime
buttons as was previously (it has been changed by first attempt), but
Wl hides buttons in reply anyway.
Index: mime-view.el
===================================================================
RCS file: /cvs/root/semi/mime-view.el,v
retrieving revision 1.151.2.28
diff -p -u -w -r1.151.2.28 mime-view.el
--- mime-view.el 24 Oct 2010 10:39:22 -0000 1.151.2.28
+++ mime-view.el 10 Apr 2011 03:20:45 -0000
@@ -82,6 +82,13 @@ buttom. Nil means don't scroll at all."
:group 'mime-view
:type 'boolean)
+(defcustom mime-view-content-types-to-show '(application)
+ "Content types which have MIME buttons rendered."
+ :group 'mime-view
+ :type '(repeat sexp))
+
+(defvar mime-hide-buttons-in-reply nil)
+
;;; @ in raw-buffer (representation space)
;;;
@@ -1095,11 +1102,14 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYP
(or situation
(setq situation
(mime-find-entity-preview-situation entity default-situation)))
- (let ((button-is-invisible
- (or (not mime-view-buttons-visible)
- (eq (cdr (or (assq '*entity-button situation)
- (assq 'entity-button situation)))
- 'invisible)))
+ (let* ((entity-button (cdr (or (assq '*entity-button situation)
+ (assq 'entity-button situation))))
+ (button-is-visible
+ (or mime-view-buttons-visible
+ (and entity-button
+ (not (eq entity-button 'invisible)))
+ (member (cdr (assq 'type (mime-entity-content-type entity)))
+ mime-view-content-types-to-show)))
(header-is-visible
(eq (cdr (or (assq '*header situation)
(assq 'header situation)))
@@ -1112,11 +1122,8 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYP
(set-buffer preview-buffer)
(setq nb (point))
(narrow-to-region nb nb)
- (or button-is-invisible
- ;; (if (mime-view-entity-button-visible-p entity)
- (mime-view-insert-entity-button entity)
- ;; )
- )
+ (when (and button-is-visible (not mime-hide-buttons-in-reply))
+ (mime-view-insert-entity-button entity))
(if header-is-visible
(let ((header-presentation-method
(or (cdr (assq 'header-presentation-method situation))
Index: wl/wl-summary.el
===================================================================
RCS file: /cvs/root/wanderlust/wl/wl-summary.el,v
retrieving revision 1.450
diff -p -u -w -r1.450 wl-summary.el
--- wl/wl-summary.el 18 Oct 2010 07:43:32 -0000 1.450
+++ wl/wl-summary.el 10 Apr 2011 03:21:04 -0000
@@ -4031,6 +4031,9 @@ Return t if message exists."
(defun wl-summary-reply-with-citation (&optional arg)
(interactive "P")
+ (let ((mime-hide-buttons-in-reply t))
+ (wl-message-buffer-cache-clean-up)
+ (wl-summary-redisplay))
(when (wl-summary-reply arg t)
(goto-char (point-max))
(wl-draft-yank-original)
--
wbr, Vitaly