" (" (cadr mime-module-version) ")"))
+;;; @ variables
+;;;
+
+(defgroup mime-view nil
+ "MIME view mode"
+ :group 'mime)
+
+(defcustom mime-view-find-every-acting-situation nil
+ "*Find every available acting-situation if non-nil."
+ :group 'mime-view
+ :type 'boolean)
+
+(defcustom mime-view-acting-example-file "~/.mime-example"
+ "*File name of example about acting-situation demonstrated by user."
+ :group 'mime-view
+ :type 'file)
+
+
;;; @ buffer local variables
;;;
;;; @@@ predicate function
;;;
-(defvar mime-view-childrens-header-showing-Content-Type-list
- '("message/rfc822" "message/news"))
+;; (defvar mime-view-childrens-header-showing-Content-Type-list
+;; '("message/rfc822" "message/news"))
-(defun mime-view-header-visible-p (entity message-info)
- "Return non-nil if header of ENTITY is visible."
- (let ((entity-node-id (mime-entity-node-id entity)))
- (member (mime-entity-type/subtype
- (mime-raw-find-entity-from-node-id
- (cdr entity-node-id) message-info))
- mime-view-childrens-header-showing-Content-Type-list)
- ))
+;; (defun mime-view-header-visible-p (entity message-info)
+;; "Return non-nil if header of ENTITY is visible."
+;; (let ((entity-node-id (mime-entity-node-id entity)))
+;; (member (mime-entity-type/subtype
+;; (mime-raw-find-entity-from-node-id
+;; (cdr entity-node-id) message-info))
+;; mime-view-childrens-header-showing-Content-Type-list)
+;; ))
;;; @@@ entity header filter
;;;
;;; @ acting-condition
;;;
-(defvar mime-acting-condition
- '(((type . text)(subtype . plain)
- (method "tm-plain" nil 'file "" 'encoding 'mode 'name)
- (mode "play" "print")
- )
- ((type . text)(subtype . html)
- (method "tm-html" nil 'file "" 'encoding 'mode 'name)
- (mode . "play")
- )
- ((type . text)(subtype . x-rot13-47)
- (method . mime-method-to-display-caesar)
- (mode . "play")
- )
- ((type . text)(subtype . x-rot13-47-48)
- (method . mime-method-to-display-caesar)
- (mode . "play")
- )
-
- ((type . audio)(subtype . basic)
- (method "tm-au" nil 'file "" 'encoding 'mode 'name)
- (mode . "play")
- )
-
- ((type . image)
- (method "tm-image" nil 'file "" 'encoding 'mode 'name)
- (mode "play" "print")
- )
-
- ((type . video)(subtype . mpeg)
- (method "tm-mpeg" nil 'file "" 'encoding 'mode 'name)
- (mode . "play")
- )
-
- ((type . application)(subtype . postscript)
- (method "tm-ps" nil 'file "" 'encoding 'mode 'name)
- (mode "play" "print")
- )
- ((type . application)(subtype . octet-stream)
- (method . mime-method-to-save)(mode "play" "print")
- )
-
- ((type . message)(subtype . external-body)
- ("access-type" . "anon-ftp")
- (method . mime-method-to-display-message/external-ftp)
- )
- ((type . message)(subtype . rfc822)
- (method . mime-method-to-display-message/rfc822)
- (mode . "play")
- )
- ((type . message)(subtype . partial)
- (method . mime-method-to-store-message/partial)
- (mode . "play")
- )
-
- ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)
- (mode . "play")
- )
- ((method . mime-method-to-save)(mode . "extract"))
- ))
+(defvar mime-acting-condition nil
+ "Condition-tree about how to process entity.")
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . t)(subtype . t)(mode . "play")
+ (method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)
+ ))
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . t)(subtype . t)(mode . "extract")
+ (method . mime-method-to-save)))
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . text)(subtype . plain)(mode . "play")
+ (method "tm-plain" nil 'file "" 'encoding 'mode 'name)
+ ))
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . text)(subtype . plain)(mode . "print")
+ (method "tm-plain" nil 'file "" 'encoding 'mode 'name)
+ ))
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . text)(subtype . html)(mode . "play")
+ (method "tm-html" nil 'file "" 'encoding 'mode 'name)
+ ))
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . text)(subtype . x-rot13-47)(mode . "play")
+ (method . mime-method-to-display-caesar)
+ ))
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . text)(subtype . x-rot13-47-48)(mode . "play")
+ (method . mime-method-to-display-caesar)
+ ))
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . audio)(subtype . basic)(mode . "play")
+ (method "tm-au" nil 'file "" 'encoding 'mode 'name)
+ ))
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . image)(mode . "play")
+ (method "tm-image" nil 'file "" 'encoding 'mode 'name)
+ ))
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . image)(mode . "print")
+ (method "tm-image" nil 'file "" 'encoding 'mode 'name)
+ ))
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . video)(subtype . mpeg)(mode . "play")
+ (method "tm-mpeg" nil 'file "" 'encoding 'mode 'name)
+ ))
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . application)(subtype . postscript)(mode . "play")
+ (method "tm-ps" nil 'file "" 'encoding 'mode 'name)
+ ))
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . application)(subtype . postscript)(mode . "print")
+ (method "tm-ps" nil 'file "" 'encoding 'mode 'name)
+ ))
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . message)(subtype . rfc822)(mode . "play")
+ (method . mime-method-to-display-message/rfc822)
+ ))
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . message)(subtype . partial)(mode . "play")
+ (method . mime-method-to-store-message/partial)
+ ))
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . message)(subtype . external-body)
+ ("access-type" . "anon-ftp")
+ (method . mime-method-to-display-message/external-ftp)
+ ))
+
+(ctree-set-calist-strictly
+ 'mime-acting-condition
+ '((type . application)(subtype . octet-stream)
+ (method . mime-method-to-save)
+ ))
;;; @ quitting method
(cdr (assq 'message-button situation)))
(body-presentation-method
(cdr (assq 'body-presentation-method situation))))
- (when message-button
+ (when (eq message-button 'visible)
(goto-char (point-max))
(mime-view-insert-entity-button message-info message-info subj)
)
(button-is-invisible
(eq (cdr (assq 'entity-button situation)) 'invisible))
(header-is-visible
- (cdr (assq 'header situation)))
+ (eq (cdr (assq 'header situation)) 'visible))
(body-presentation-method
(cdr (assq 'body-presentation-method situation))))
(set-buffer obuf)
It calls following-method selected from variable
`mime-view-following-method-alist'."
(interactive)
- (let ((message-info (get-text-property (point-min) 'mime-view-entity))
- entity)
+ (let (entity)
(while (null (setq entity
(get-text-property (point) 'mime-view-entity)))
(backward-char)
(erase-buffer)
(insert-buffer-substring the-buf p-beg p-end)
(goto-char (point-min))
- (if (mime-view-header-visible-p entity message-info)
- (delete-region (goto-char (point-min))
- (if (re-search-forward "^$" nil t)
- (match-end 0)
- (point-min)))
- )
- (goto-char (point-min))
- (insert "\n")
- (goto-char (point-min))
- (let ((entity-node-id (mime-entity-node-id entity)) ci str)
+ (let ((entity-node-id (mime-entity-node-id entity)) ci str)
(while (progn
(setq
str