Hi Alexis > in my browser (Iceweasel née Firefox), i've created a function: > > (defun new-message-from-uri (uri) > "Create a new email message based on a 'mailto' URI and its parameters." > (let ((uri-decoded (url-unhex-string uri)) > (to-address-re "mailto:\\([^?]+\\)") > (to-address "") > (has-args-re "\\(\\?\\)") > (has-args-p nil) > (args-alist '())) > (string-match to-address-re uri-decoded) > (setq to-address (match-string 1 uri-decoded)) > (string-match has-args-re uri-decoded) > (setq has-args-p (match-string 1 uri-decoded)) > (if has-args-p > (let ((args-re "\\([^&=]+\\)=\\([^&]+\\)")) > (while (string-match args-re uri-decoded (match-end 0)) > (setq args-alist (cons `(,(match-string 1 uri-decoded) . > ,(match-string 2 uri-decoded)) args-alist))))) > (if (assoc "Subject" args-alist) > (message-mail to-address (cdr (assoc "Subject" args-alist)) > args-alist) > (message-mail to-address nil args-alist)))) >
You or others seeking to do similar things may be interested in the function mu4e~compose-browse-url-mail https://github.com/djcb/mu/blob/2575e6b0a8da8c9c7e77cf2812862d99957dec82/mu4e/mu4e-compose.el#L574 which has similar capabilities. Best, Josiah -- You received this message because you are subscribed to the Google Groups "mu-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
