Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-09 Thread Michael Wagner
* green greenfreedo...@gmail.com 09.09.2009
 Michael Wagner wrote at 2009-09-08 15:11 -0500:
  * Michael Wagner michaeldeb...@web.de 08.09.2009
   * Elimar Riesebieter riese...@lxtec.de 04.09.2009
I've tried settings - apps - mailto - shellscript
  
  Apart from my other message you can also make it like this:
  
  settings - apps - mailto - /usr/lib/mutt/mailto-mutt
 
 But this won't work in Lenny... mutt 1.5.18-6 does not seem to include that 
 file.

You are right, it's only included in unstable mutt (1.5.20-2), but the 
OP wrote that he works with iceweasel 3.5 which is in experimental. So 
I thought a solution for unstable is ok.

Michael

-- 
To conquer oneself is the noblest and greatest triumph.
-Plato


signature.asc
Description: Digital signature


Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-09 Thread green
Michael Wagner wrote at 2009-09-09 01:10 -0500:
 * green greenfreedo...@gmail.com 09.09.2009
  Michael Wagner wrote at 2009-09-08 15:11 -0500:
   * Michael Wagner michaeldeb...@web.de 08.09.2009
* Elimar Riesebieter riese...@lxtec.de 04.09.2009
 I've tried settings - apps - mailto - shellscript
   
   Apart from my other message you can also make it like this:
   
   settings - apps - mailto - /usr/lib/mutt/mailto-mutt
  
  But this won't work in Lenny... mutt 1.5.18-6 does not seem to include that 
  file.
 
 You are right, it's only included in unstable mutt (1.5.20-2), but the 
 OP wrote that he works with iceweasel 3.5 which is in experimental. So 
 I thought a solution for unstable is ok.

Indeed.  I suppose there are many people here who run Lenny and use mutt and 
iceweasel; that note was for their benefit so they need not look for a file 
which does not exist (like I did).


signature.asc
Description: Digital signature


Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-09 Thread Elimar Riesebieter
* green [090909 07:51 -0500]
 Michael Wagner wrote at 2009-09-09 01:10 -0500:
  * green greenfreedo...@gmail.com 09.09.2009
   Michael Wagner wrote at 2009-09-08 15:11 -0500:
* Michael Wagner michaeldeb...@web.de 08.09.2009
 * Elimar Riesebieter riese...@lxtec.de 04.09.2009
  I've tried settings - apps - mailto - shellscript

Apart from my other message you can also make it like this:

settings - apps - mailto - /usr/lib/mutt/mailto-mutt

This is somewhat overscripted from madduck ;-) The faxt is, that my
mutt (hg version from Mutt 1.5.20+lxtecppc (2009-08-04) doesn't
interpret neither $@ nor $[0-9]. I'll get over to mutt-dev with
this.

Thanks you all
EOT

Elimar

-- 
  Experience is something you don't get until 
  just after you need it!


signature.asc
Description: Digital signature


Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-09 Thread martin f krafft
also sprach Elimar Riesebieter riese...@lxtec.de [2009.09.09.1918 +0200]:
 This is somewhat overscripted from madduck ;-) The faxt is, that my
 mutt (hg version from Mutt 1.5.20+lxtecppc (2009-08-04) doesn't
 interpret neither $@ nor $[0-9]. I'll get over to mutt-dev with
 this.

I don't understand. mutt has no business with $@ or $[0-9], but
I think you are probably hit by #545876. Does the patch fix it for
you?

-- 
 .''`.   martin f. krafft madd...@d.o  Related projects:
: :'  :  proud Debian developer   http://debiansystem.info
`. `'`   http://people.debian.org/~madduckhttp://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
emacs sucks, literally, not an insult, just a comment that it's
 large enough to have a noticeable gravitational pull...
   -- mercury on #debian-devel


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-09 Thread Elimar Riesebieter
* martin f krafft [090909 20:29 +0200]
 also sprach Elimar Riesebieter riese...@lxtec.de [2009.09.09.1918 +0200]:
  This is somewhat overscripted from madduck ;-) The faxt is, that my
  mutt (hg version from Mutt 1.5.20+lxtecppc (2009-08-04) doesn't
  interpret neither $@ nor $[0-9]. I'll get over to mutt-dev with
  this.
 
 I don't understand. mutt has no business with $@ or $[0-9], but
 I think you are probably hit by #545876. Does the patch fix it for
 you?

No.

Elimar

-- 
  We all know Linux is great... it does infinite loops in 5 seconds.
-- Linus Torvalds


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-09 Thread martin f krafft
also sprach Elimar Riesebieter riese...@lxtec.de [2009.09.09.2249 +0200]:
  I don't understand. mutt has no business with $@ or $[0-9], but
  I think you are probably hit by #545876. Does the patch fix it for
  you?
 
 No.

I'll need more information then. Maybe you can isolate the entire
argument line passed to mailto-mutt (e.g.
mailto:f...@bar.com?cc=a@b.comsubject=bla…) and let me know? The
best way to get that is probably by substituting a script that just
calls   echo $@  /tmp/file

-- 
 .''`.   martin f. krafft madd...@d.o  Related projects:
: :'  :  proud Debian developer   http://debiansystem.info
`. `'`   http://people.debian.org/~madduckhttp://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
no, 'eureka' is greek for 'this bath is too hot.'
-- dr. who


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-08 Thread Michael Wagner
* Elimar Riesebieter riese...@lxtec.de 04.09.2009
 I've tried settings - apps - mailto - shellscript
 
 Shellscript:
 
 #!/bin/sh
 exec xterm -e mutt $@
 
 The xterm only pops up for 1 second.
 
 Any hints?

Hello Elimar,

in the mutt package is the shellscript /usr/lib/mutt/mailto-mutt, which 
is the solution for your problem. These are the first lines from the 
script.

# mailto-mutt -- wrapper to be able to use mutt as mailto handler from 
# firefox
#
# To use, surf to Firefox's about:config page and configure the 
# following
# three values:
#   network.protocol-handler.external.mailto boolean true
#   network.protocol-handler.app.mailto string '/path/to/handler'
#   network.protocol-handler.warn-external.mailto boolean false


Hth Michael

-- 
Death is just God's way of dropping carrier.


signature.asc
Description: Digital signature


Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-08 Thread Michael Wagner
* Michael Wagner michaeldeb...@web.de 08.09.2009
 * Elimar Riesebieter riese...@lxtec.de 04.09.2009
  I've tried settings - apps - mailto - shellscript

Apart from my other message you can also make it like this:

settings - apps - mailto - /usr/lib/mutt/mailto-mutt

Hth Michael

-- 
Every production of genius must be the production 
 of enthusiasm.
--Benjamin Disraeli 


signature.asc
Description: Digital signature


Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-08 Thread green
Michael Wagner wrote at 2009-09-08 15:11 -0500:
 * Michael Wagner michaeldeb...@web.de 08.09.2009
  * Elimar Riesebieter riese...@lxtec.de 04.09.2009
   I've tried settings - apps - mailto - shellscript
 
 Apart from my other message you can also make it like this:
 
 settings - apps - mailto - /usr/lib/mutt/mailto-mutt

But this won't work in Lenny... mutt 1.5.18-6 does not seem to include that 
file.


signature.asc
Description: Digital signature


Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-07 Thread Elimar Riesebieter
* s. keeling [090907 02:14 +]
 Elimar Riesebieter riese...@lxtec.de:
   I've tried settings - apps - mailto - shellscript
  
   Shellscript:
  
   #!/bin/sh
   exec xterm -e mutt $@
  
   The xterm only pops up for 1 second.
  
   Any hints?
 
 Ben at linuxgazette.net and I've been playing with this for years (I
 haven't used it in a while; caveat emptor):
 

 #!/usr/bin/perl

All the contributed solutions don't extract the URL in to the
mailbody of mutt in the case of choosing send link within FF3.5.2.

Elimar


-- 
.~.
/V\   L   I   N   U   X
   /( )\ Phear the Penguin
   ^^-^^


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-06 Thread s. keeling
Elimar Riesebieter riese...@lxtec.de:
  I've tried settings - apps - mailto - shellscript
 
  Shellscript:
 
  #!/bin/sh
  exec xterm -e mutt $@
 
  The xterm only pops up for 1 second.
 
  Any hints?

Ben at linuxgazette.net and I've been playing with this for years (I
haven't used it in a while; caveat emptor):

   
#!/usr/bin/perl
#
# pinehelper.pl - Original from Ben Okopnik of LinuxGazette.net
#
#   i) install wherever you want, make it world execute.
# 
#  ii) edit the user's prefs.js (via about:config) in 
#  ~/.mozilla/firefox/$blah.default:
#
# user_pref(network.protocol-handler.app.mailto, \
# /path/to/pinehelper);
#
# iii) edit $fn and geometry to taste.
#
# Restart FF, and clicking on a mailto:; link should fire up
# an xterm running mutt.  To: will already be filled in.  If
# the link provided a Subject:, it should be handled as well.
#
# 13Nov2005   Ben Okopnik   0001   Fix Firefox mailto: handling
# 16Jun2007   sbk   0002   bulletproofing, strict, my().
#

use diagnostics;
use warnings;
use strict;

my ( $fn, @chunks, $key, $value, %header, $opts);

# xterm font
#
# $fn = q(-*-*-medium-r-normal-*-12-*-*-*-c-*-iso8859-15);
$fn = q(-*-*-medium-r-normal-*-15-*-*-*-c-*-iso8859-15);
$geom = q(105x57-84+64);

@chunks = split /[?]/, shift;

for ( @chunks ) {

   ( $key, $value ) = split /[:=]/;

   # Cheap-ass entity conversion; populates %header hash as:
   #
   #   key  value
   #   ---  -
   #   subject  subject string
   #   mailto   w...@where.com
   #
   ( $header{ $key } = $value ) =~ s/%(..)/pack(H2,$1)/eg;
}

# Define Mutt switches for any headers we're interested in, including
# optional ones
# 
$opts = qq[ -s $header{subject} ] if exists $header{subject};
$opts .= $header{mailto};

exec qq(/usr/bin/xterm -fn $fn -geometry $geom -T Mutt -e /usr/bin/mutt $opts) 
||
die qq(Blue?  No, red?!  A!: $!);

__END__

   



-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)http://blinkynet.net/comp/uip5.html  Linux Counter #80292
- -http://www.faqs.org/rfcs/rfc1855.htmlPlease, don't Cc: me.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-04 Thread Chris Jackson

Elimar Riesebieter wrote:


I've tried settings - apps - mailto - shellscript

Shellscript:

#!/bin/sh
exec xterm -e mutt $@


I'm guessing mutt can't parse the mailto: line given out by iceweasel.

Here's a very quick and very dirty bit of perl I knocked up; I'm not 
suggesting it's right, but it'll hopefully give you a starting point:



#!/usr/bin/perl

sub escape {
  $result=$_[0];
  $result=~s{([\$])}{\\$1}g;
  return \$result\;
}

($dummy, $params)=split /:/, $ARGV[0], 2;
($address, $params)=split /\?/, $params, 2;
print $params\n;
for $x(split //, $params) {
  ($key, $val)=split /=/, $x, 2;
  print $key: $val\n;
  $paramhash{$key}=$val;
}

$cmd=mutt;
$cmd.= -s .escape($paramhash{subject}) if($paramhash{subject});
$cmd.= -c .escape($paramhash{cc}) if($paramhash{cc});
$cmd.= -b .escape($paramhash{bcc}) if($paramhash{bcc});
$cmd.= $address;

print $cmd\n;
exec $cmd;

--
Chris Jackson
Shadowcat Systems Ltd.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org




Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-04 Thread Clive Standbridge
 I've tried settings - apps - mailto - shellscript
 
 Shellscript:
 
 #!/bin/sh
 exec xterm -e mutt $@
 
 The xterm only pops up for 1 second.

That's very close to the script that is working for me (using
Iceweasel 3.0.6 on Lenny):

#!/bin/sh

prefixWords=

if [ -t 0 -a -t 1 ]
then
prefixWords=
else
prefixWords=xterm -e
fi

set -x
$prefixWords mutt -- $@


I don't think your exec should cause a problem, but it may be worth
trying without it.

You may need the -- in case any of the arguments begins with '-'. 
I can't think off-hand if that is likely.

By the way, the if tests whether you're running from a terminal
already, and opens mutt there if you are. Otherwise it fires up an
xterm.


You might get some more information by temporarily changing your xterm
line to

exec xterm -e bash -c set -x; mutt $*; read -p 'Press enter to exit '


-- 
Cheers,
Clive


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-04 Thread Elimar Riesebieter
* Clive Standbridge [090904 16:47 +0100]
  I've tried settings - apps - mailto - shellscript
  
  Shellscript:
  
  #!/bin/sh
  exec xterm -e mutt $@
  
  The xterm only pops up for 1 second.
 
 That's very close to the script that is working for me (using
 Iceweasel 3.0.6 on Lenny):
 
[...]
 exec xterm -e bash -c set -x; mutt $*; read -p 'Press enter to exit '

+ subject=%3CLinux%3E%20-%20Google-Suche
+ read -p 'Press enter to exit '
Press enter to exit + mutt
'mailto:?body=http%3A%2F%2Fwww.google.de%2Flinux'
Failed to parse mailto: link

Mutt can't read $*

This is with iceweasel 3.5.2 and 
Mutt 1.5.20+lxtec (2009-07-23)

Elimar

-- 
  It's a good thing we don't get all 
  the government we pay for.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto

2009-09-04 Thread Osamu Aoki
On Fri, Sep 04, 2009 at 03:00:13PM +0200, Elimar Riesebieter wrote:
 I've tried settings - apps - mailto - shellscript
 
 Shellscript:
 
 #!/bin/sh
 exec xterm -e mutt $@
 
 The xterm only pops up for 1 second.

I use following in lenny and works fine:
--
#!/bin/sh
gnome-terminal -e mutt $@
--

these terminal softwares act not exactly the same with -e and -x options.

With gnome-terminal:
  -e, --command=STRING
 Execute the argument to this option inside the terminal.

   -x, --execute
 Execute the remainder of the command line inside the terminal.

With xterm:
   -e program [ arguments ... ]
   This option specifies the program (and its command line 
arguments) to be run in the xterm window.  It also sets the win‐
   dow  title  and icon name to be the basename of the program 
being executed if neither -T nor -n are given on the command
   line.  This must be the last option on the command line.

Osamu


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org