jowens
jowens

Reputation: 383

emacs 23 on OS X: mailto links & calling compose-mail?

I'm trying the 23.2 release Cocoa Emacs build (OS X 10.6). There's a number of things that are more annoying about Cocoa Emacs than the terrific Carbon Emacs (based on an Emacs 22 build, I believe), so I hoped folks might have some solutions/thoughts (unfortunately posting on neither the carbon-emacs list nor emacs-dev has produced a useful reply, so I thought I'd try Stack Overflow for the first time):

    (setq browse-url-browser-function
          '(("^http:" . browse-url-generic)
            ("^https:" . browse-url-generic)
            ("^mailto:" lambda (url &rest stuff) (compose-mail 
                                                  (substring to 7)))
            ;; ("^mailto:"  . browse-url-mail) ;; same behavior
            ("^file:.*\\.html?$" . w3m-browse-url))
    )

Upvotes: 1

Views: 650

Answers (1)

Kirk Kelsey
Kirk Kelsey

Reputation: 4544

I suspect that emacs is failing to find the 'file' it's being told to open. Try a couple things on the command line to see what happens:

emacs mailto:[email protected]

should just open emacs and stare at you blankly.

emacs --eval '(browse-url "mailto:[email protected]")'

should handle the url.

If that all checks out, then you need to wrap things when firefox makes it's invocation (with a script unless FF lets you specify the command line using a %s replacement). Alternatively, you might be able to get things working by setting TRAMP up to understand a mailto: url, but that seems a bit convoluted.

(now that I know what to look for: you might find the EmacsWiki:MailtoHandler helpful.)

Upvotes: 0

Related Questions