[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: [PATCH] Add `w3m-send-page-by-mail'

>>>>> In [emacs-w3m : No.08805] Luca Capello <luca@xxxxxx> wrote:

> Hello!

> I'm sorry to answer to a very old thread [1], but as I had some free
> time, I implemented the requested function,

Thank you for the contribution.  I tried it under the condition
that `mail-user-agent' is `gnus-user-agent'.  It works very well.

> even if I'll probably never use it.

Me too. ;-)

> On Thu, 25 May 2006 11:55:39 +0200, Katsumi Yamaoka wrote:
>>>>>>> In [emacs-w3m : No.08723] 清秀 wrote:
>>> When I use Microsoft IE 6.0, I can send a page by choosing
>>> File->send->page by email.  I wonder when I use w3m in emacs, is
>>> there a similar function? Thanks a lot!
>> You can do it using Gnus and emacs-w3m, though it is not very handy.

> The patch attached adds a series of variables and the function
> `w3m-send-page-by-mail', which does exactly what Katsumi-san (if I'm
> correct about the Japanese suffix) suggested.

You're right (most of foreigners use the first name Katsumi but
Japanese folks usually use the family name Yamaoka-san though).

> Moreover, you can control the behavior via the self-explained
> variables.

> I tested it on No Gnus 0.5, but it should work with all the Emacs MUA
> (at least from what I understood from the documentation of
> `compose-mail').

Maybe MH-E works because the recent one wholly relies on Gnus'
MIME functions including MML.  VM, Mew, Wanderlust and the other
SEMI-MUAs will not work because the `C-c C-c' command is not a
trigger to parse MML tags.  And I don't know how MUAs other than
them do.  Probably we will have to provide several functions for
every MUA individually like the following:

(defun w3m-send-page-by-mail ()
  (cond ((memq mail-user-agent '(gnus-user-agent
	((eq mail-user-agent 'vm-user-agent)
	 (error "Not implemented yet")
	((eq mail-user-agent 'mew-user-agent)
	 (error "Not implemented yet")
	((memq mail-user-agent '(wl-user-agent))
	 (error "Not implemented yet")
	 (error "Not implemented yet"))))

I believe Mew and Wanderlust people will make them soon, though.
I'll ask to them later.

> The only caveat it that I'd like to have the e-mail completion when
> asking for the address, but I don't know how to do it (check the
> source code for the comments about it).

It seems to be relevant also to what MUA is used.  I think the
use simply of `read-string' is enough for the moment.

> As I don't know where to put it, it's a new file, but I could agree
> that the filename isn't the best one.  If needed, I can prepare a
> ChangeLog entry.

w3m-mail.el?  Well, it might not be good but I think w3m-source.el
is also not good since people might not be able to imagine what
it does.

> Comments are welcome!

Me too. ;-)

> Thx, bye,
> Gismo / ルカ

> [1] http://emacs-w3m.namazu.org/ml/msg08616.html