From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/536 Path: news.gmane.org!not-for-mail From: Christian Lemburg Newsgroups: gmane.emacs.gnus.user Subject: Invoking gnus as mail agent from opera Date: 29 May 2002 16:18:49 +0200 Organization: KPNQwest Germany GmbH, customer reader site Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138667506 7356 80.91.229.2 (31 Jan 2006 00:31:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:31:46 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:27:44 2006 Original-Path: quimby.gnus.org!news.ccs.neu.edu!news.dfci.harvard.edu!news.cis.ohio-state.edu!news.ems.psu.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!t-online.de!blackbush.xlink.net!blackbush.de.kpnqwest.net!scapa.de.kpnqwest.net!194.121.123.2!194.121.123.146 Original-Newsgroups: gnu.emacs.gnus Original-Sender: lemburg@maki.aixonix.de Original-NNTP-Posting-Host: 194.121.123.2 Original-X-Trace: newsreader2.lb-lan.ka.de.kpnqwest.net 1022682071 14726 194.121.123.2 (29 May 2002 14:21:11 GMT) Original-X-Complaints-To: "abuse@de.kpnqwest.net" Original-NNTP-Posting-Date: Wed, 29 May 2002 14:21:11 +0000 (UTC) X-Face: "PlaRZ)@9[if~e#S1]D7|l`|7"C.kV+P^$.r!pL"NE^5Gh[Fwr?wR-@{Me)_Dfyec#Mi4M7 KWUn#dE$B3L3?WX:lR.vf-LI+w3OJL46>O2+HP#h$;.*K^Om]xOh8a>F1"6{%;k>=/;{Pn%sX2~'E? User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) X-Original-NNTP-Posting-Host: 194.121.123.146 Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:676 Original-Lines: 63 X-Gnus-Article-Number: 676 Tue Jan 17 17:27:44 2006 Xref: news.gmane.org gmane.emacs.gnus.user:536 Archived-At: Since I did not find anything on how to invoke gnus as mail agent from opera (for mailto links), I decided to post my solution for the next person having this problem. Sketch of the idea: opera invokes a perl wrapper script that interpolates the mailto address into a call to gnuclient with a small lisp helper function. Gnus is assumed to be already running. Pieces: 1) my-mailto-handler.el: (defun my-mailto-handler (mail-address) "Compose new mail, using MAIL-ADDRESS given" (gnus-group-mail) (message-goto-to) (insert mail-address) (message-goto-body)) 2) gnus-mailto.pl: #!/usr/bin/perl -w # small perl script for invoking gnus from opera on mailto: Urls # author: Christian Lemburg # version: $Id: gnus-mailto.pl,v 1.1 2002/05/29 11:40:00 lemburg Exp $ # -------------------------------------------------- # setup # -------------------------------------------------- # command to invoke emacs my $emacs_command = "gnuclient"; # function to handle mailto URL taking email address as only argument my $mailto_handler_function = "my-mailto-handler"; # email address to send mail to - the mailto argument from opera my $email_address = $ARGV[0]; # -------------------------------------------------- # action # -------------------------------------------------- # like: gnuclient -eval '(my-mailto-handler "try@bla")' system($emacs_command, "-eval", qq{($mailto_handler_function "$email_address")}); 3) opera preferences setting in Applications - Email Client: gnus-mailto.pl -- Christian Lemburg, , http://www.clemburg.com/ Experience is something you don't get until just after you need it. -- Olivier