[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to set up Gnus as default mailto application in Ubuntu?
From: |
Marius Hofert |
Subject: |
Re: How to set up Gnus as default mailto application in Ubuntu? |
Date: |
Fri, 1 Feb 2013 09:42:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Hi Ashish,
Thanks a lot for helping.
How can I use the script?
google-chrome -> Settings -> Privacy -> Content settings... -> Handlers ->
Manage handlers... somehow does not allow to add scripts.
Cheers,
Marius
Ashish SHUKLA <wahjava.ml@gmail.com> writes:
> Marius Hofert writes:
>> Hi,
>
>> When I click a "mailto-link" in google-chrome (on Ubuntu 12.10), thunderbird
>> pops up as default application. I was wondering if one can do something
>> similar
>> as in the answer on
>
>> ,----
>> |
>> http://askubuntu.com/questions/40004/changing-email-application-in-preferred-applications-to-gmail
>> `----
>
>> for setting up Gnus as default mailto-application under Ubuntu (?)
>
> A proof-of-concept shell script like following should do the basic job, and
> ofcourse it requires an Emacs instance running:
>
> #v+
> #!/bin/sh
>
> ARG="$1"
>
> if [ -z "$ARG" ]; then exit 0; fi
>
> RECIPIENT=$(echo $ARG |sed -r -n -e
> '/^mailto:/s/^mailto:([^@]+@[[:alnum:].-]+).*$/\1/gp')
> SUBJECT="$(echo $ARG |sed -r -n -e
> '/^mailto:/s/^mailto:[^@]+@[[:alnum:].-]+[?].*&?subject=([^&]+).*$/\1/gp')"
>
> emacsclient -e '(progn (gnus-group-mail) (message-goto-to) (insert
> "'$RECIPIENT'") (message-goto-subject) (insert "'"$SUBJECT"'")
> (message-goto-body))'
> #v-
>
> If you prefer messages to be opened in new window then
> s/emacsclient/emacsclient -c/.
>
> HTH
- Re: How to set up Gnus as default mailto application in Ubuntu?,
Marius Hofert <=