← Back to team overview

vm team mailing list archive

Re: VM and W3M in quoted reply buffers

 

Dear Bob,  Thanks very much for contributing the fix below.  I couldn't have
figured it out myself because I don't use w3m.

I was pointed to this wiki page

  http://www.emacswiki.org/emacs/ViewMailWishlist

which still has outdated information.  Will you be able to update it with the
correct information?

I also wonder why these problems didn't crop up earlier because the change to
the reply functionality was done in 8.0.12.  Did it not arise with 8.0.12?

Cheers,
Uday


BobNewell wrote:
> I've had an issue for a while.  I use VM 8.1 in conjunction with w3m
> to render HTML mail; nothing remotely special here.
> 
> But when I do an "R" for reply with quote, the w3m minor mode is
> invoked in the reply buffer.  This means for instance the "down" key
> maps to the function for going to the next URL.  This is not at all
> what I want, in order to be able to interleave my replies with the
> quoted (careted) original message.
> 
> I don't want to use the customization option to globally turn off use
> of w3m minor mode because it's what I want in the original buffer, to
> be able to follow URLs, etc.  What I want is to just have the minor
> mode be "off" in a reply buffer.
> 
> Does anyone else view this as an issue?
> 
> My workaround (please don't laugh *too* hard) is the following
> terrible hack to vm-mime-display-internal-emacs-w3m-test/html in vm-
> w3m.el:
> 
> (defun vm-mime-display-internal-emacs-w3m-text/html (start end layout)
>   "Use emacs-w3m to inline HTML mails in the VM presentation buffer."
>   (let ((w3m-display-inline-images vm-w3m-display-inline-images)
>         (w3m-safe-url-regexp vm-w3m-safe-url-regexp))
>         (w3m-region start (1- end))
>     (add-text-properties
>      start end
>      (nconc (if vm-w3m-use-w3m-minor-mode-map
> ;; start rjn changes, do not use w3m mode map in any kind of reply
> buffer
> 		(if (equal (string-match "reply" (buffer-name)) nil)
>                 	(vm-w3m-local-map-property)))
> ;; end rjn changes
>             ;; Put the mark meaning that this part was
>             ;; inlined by emacs-w3m.
>             '(text-rendered-by-emacs-w3m t)))))
> 
> This works for the moment, but surely there's a better way, assuming I
> have a legitimate issue.