[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: w3m-browse-url and mailto
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Mon, 20 Feb 2012 11:28:00 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11762
- References: <878vjz1jla.fsf@xxxxxxxxxxxxxxxxx>
In [emacs-w3m : No.11759] Memnon Anon wrote:
> I tried to send a bugreport with icicle-send-bug-report, which looks
> like this:
> (defun icicle-send-bug-report ()
> "Send a bug report about an Icicles problem."
> (browse-url (format (concat "mailto:" "drew.adams" "@" "oracle" ".com?subject=\
> Icicles bug: \
> &body=Describe bug below, using a precise recipe that starts with `emacs -Q' or `emacs -q'. \
> Each Icicles file has a header `Update #' that you can use to identify it.\
> %%0A%%0AEmacs version: %s.")
> which failed for me: I had browse-url-browser-function set to
> w3m-browse-url just like suggested in (info "(emacs-w3m)Tips").
How does it fail? I obtained
, tried `icicle-send-bug-report', and got:
| To: drew.adams@xxxxxxxxxx
| Subject: Icicles bug:
| --text follows this line--
| Describe bug below, using a precise recipe that starts with `emacs -Q' or `emacs -q'. Each Icicles file has a header `Update #' that you can use to identify it.
| Emacs version: GNU Emacs 22.214.171.124 (i686-pc-cygwin, X toolkit, Xaw3d scroll bars) of 2012-02-20 on localhost.
It doesn't look funny to me, hmm.
> After some experimentation, it seemed to me that calling
> mail-user-agent (set to gnus-user-agent here) doesn't really work with
> mailto and &body in it, with or without rfc2368.el .
> It seems all that happens is that a header "body" gets inserted (?).
I know `gnus-user-agent' that old versions of Gnus provided was
incomplete (some arguments weren't passed to `compose-mail', etc.).
> I could bypass that with
> (setq w3m-mailto-url-function 'gnus-url-mailto)
> , however, so something like
> "mailto:test@xxxxxxxxxxxxx?subject=test&body=bla" t) <-C-x C-e
> now works as expected.
I tried this `(w3m-browse-url ...)' and got:
| Body: bla
| To: test@xxxxxxxxxxxxx
| Subject: test
| --text follows this line--
| (empty body)
It has to be fixed so as to insert a body=bla to the message body,
> ... icicle-send-bug-report however does not. Hu?
> Turns out this part of w3m-goto-url kicks in:
> (when (and (stringp url)
> (not (w3m-interactive-p)))
> (setq url (w3m-canonicalize-url url)))
> before we get to the
> ;; process mailto: protocol
> What does w3m-canonicalize-url do?
> (concat "http://" url)))))
etc., but does nothing with "mailto:...".
> So, "http://" gets added to the 'url' and
> ((string-match "\\`mailto:" url)
> (w3m-goto-mailto-url url post-data))
> doesn't match anymore.
It matches as far as I can observe. I'm using the latest emacs-w3m,
the latest a Gnus, ...
> I am not sure if my analysis is correct, but it certainly doesn't work.
> Question is: Should it?