← Back to team overview

vm team mailing list archive

Re: [Question #233501]: Sending HTML to a browser on click?

 

Question #233501 on VM changed:
https://answers.launchpad.net/vm/+question/233501

    Status: Answered => Open

Daniel Barrett is still having a problem:
Hmmm, I am not sure that my message was clear. Let me try again. I don't
think this is a VM bug, maybe just a misconfirmation in my .vm file?

CURRENT SETUP: VM MIME configuration right now is:

  (setq vm-mime-8bit-text-transfer-encoding '8bit)
  (setq vm-auto-decode-mime-messages t)
  (setq vm-auto-displayed-mime-content-types '("text" "text/plain" "multipart" "message"))
  (setq vm-mime-internal-content-types '("text"))
  (setq vm-mime-text/html-handler 'auto-select)
  (setq vm-mime-external-content-types-alist nil)
  (add-to-list 'vm-mime-internal-content-type-exceptions "text/html")

When I view an HTML email, I see:

  HTML (us-ascii): <no suggested filename>, HTML         [display]

And when I click on "[display]", I get "DISPLAY FAILED -- Unknown MIME
type".

SETUP #2: Next, I change the value of vm-auto-displayed-mime-content-
types to:

  (setq vm-mime-external-content-types-alist '(("text/html"
"chrome")))

Now, when I view an HTML email, the HTML is instantly sent to chrome and
a browser windows pops up.

So... here is what I am trying to do  I would like the UI from CURRENT
SETUP:

  HTML (us-ascii): <no suggested filename>, HTML         [display]

and when I click "[display]", to have chrome pop up.

I don't know if this is relevant, but here is my setup for vm-url-
browser:

(setq vm-chrome-program "chrome")
(setq vm-chrome-program-switches (list "--new-window"))
(setq vm-chrome-client-program "chrome")
(setq vm-chrome-client-program-switches (list "--new-window"))
(defun vm-mouse-send-url-to-chrome (url &optional new-window)
  (message "Sending URL to Chrome...")
  (if new-window
      (apply 'vm-run-background-command vm-chrome-program
             (append vm-chrome-program-switches (list url)))
    (or (equal 0 (apply 'vm-run-command vm-chrome-client-program
                        (append vm-chrome-client-program-switches
                                (list url))))
        (vm-mouse-send-url-to-chrome url t)))
  (message "Sending URL to Chrome... done"))
(setq vm-url-browser 'vm-mouse-send-url-to-chrome)

Thank you.

-- 
You received this question notification because you are a member of VM
development team, which is an answer contact for VM.


Follow ups

References