[Top][All Lists]

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

Re: Emacs bindings in other programs

From: Sebastian Tennant
Subject: Re: Emacs bindings in other programs
Date: Tue, 04 Dec 2007 22:55:35 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

Quoth address@hidden (Joel J. Adamson):
>>> I use MozEx to follow mailto links and edit text fields.
>> Could you tell us exactly how you use MozEx for following mailto: links
>> Joel?
> Definitely: I have the following shell-script (suggestions welcome) that
> I found on some webpage somewhere (~/.emacs.d/
> #!/bin/sh
> /usr/bin/emacsclient -e "(message-mail \"$1\")"
> and then in MozEx I enter "/home/joel/.emacs.d/ %a" in the
> "Mailer: " field, and check the "intercept mail clicks" box.

Many thanks.  This is something I've been wanting to do for ages.  Since
discovering MozEx I felt certain it was quite possible, and as always,
it's easy when you know the trick.

I've adapted the script slightly, well... a lot I suppose, because I
don't want to use (message-mail ...) to compose my mails.

I want to use (gnus-group-mail ARG), whose argument has nothing to do
with who you want to send the email to, but it does have the advantage
of making use of any posting styles you may have defined.

My script therefore simply puts the address in the kill ring so it can
be yanked into place once gnus-group-mail has set up the mail buffer.

Here it is:

 /usr/bin/emacsclient -e "(with-temp-buffer \
                            (insert \"$1\") \
                            (kill-region    \
                              (point) (progn (beginning-of-line) (point))) \


P.S. MozEx doesn't do tilde expansion.  Use an absolute path to the
     script, or none at all, if your script directory is already in your

reply via email to

[Prev in Thread] Current Thread [Next in Thread]