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

Re: Annoying HTML emails



> > As I wrote previously (*1), I write below code in my ~/.emacs.  This
> > code makes text/html entity to be displayed when alternate text/plain
> > entity does not exist.
> > 
> > (eval-after-load "mime-view"
> >   '(progn
> >      (autoload 'mime-w3m-preview-text/html "mime-w3m")
> >      (ctree-set-calist-strictly
> >       'mime-preview-condition
> >       '((type . text)
> > 	(subtype . html)
> > 	(body . visible)
> > 	(body-presentation-method . mime-w3m-preview-text/html)))
> >      (set-alist 'mime-view-type-subtype-score-alist
> > 		'(text . html) 3)
> >      (set-alist 'mime-view-type-subtype-score-alist
> > 		'(text . plain) 4)))
> 
> That's great... but shouldn't it be built-in functionality when we
> enable mime-w3m, or at least selectable via a customize option?

If you don't mind that modules are always loaded (even when it is
unneeded), below code is enough.

(require 'mime-w3m)
(eval-after-load "mime-view"
  '(set-alist 'mime-view-type-subtype-score-alist
	      '(text . plain) 4))

> > And, I tried writing a code to make the score of garbage text/plain
> > part lower.
> 
> After suitable tweaks to your mime-entity-text/plain-score, worked
> great; thanks!  Same question as above... shouldn't at least part of
> this be built in to WL/SEMI?

My local SEMI contains modified mime-display-multipart/alternative,
but I don't have a permission to commit.

> I did a quick comparison to see what you
> had actually changed in mime-display-multipart/alternative, and it
> seems you just added this simple bit that allows one to specify a
> function with which to score a MIME part.  
> 
> > 				  (when (functionp score)
> > 				    (setq score (funcall score child)))

Yes, that is what I add to mime-display-multipart/alternative.  By
this, dynamic scoring is enabled.

-- 
Kazuhiro Ito