pan-users
[Top][All Lists]
Advanced

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

[Pan-users] Re: Pan not emailing me


From: David Shochat
Subject: [Pan-users] Re: Pan not emailing me
Date: Wed, 4 Mar 2009 02:12:54 +0000 (UTC)
User-agent: Pan/0.133 (House of Butterflies)

On Tue, 03 Mar 2009 15:56:29 +0000, Beartooth wrote:

> On Mon, 02 Mar 2009 19:40:18 -0600, Gerald L wrote:
> 
>>   According to the others "Terminal" or "terminal" is probably the
>>   right
>> command -- but since alpine includes arguments you'll probably need to
>> quote it.
>> 
>> Terminal -e 'alpine -url %s'
>> 
>> or, if %s is pre-expanded by Pan
>> 
>> Terminal -e 'alpine -url ' %s
>> (note the space between -url and the final ')
> 
>       I tried pasting each of those into the proper space; neither one
> did the trick.

Got it. The key was what Duncan said, prompting me to look up the mailto 
protocol. As a first test, I set my pan Mail Reader Custom Command to:
xmessage %s
That was to see what exactly would be passed by pan. The most intriguing 
thing was that it included a literal %s followed by the mailto: URL, 
including subject and body. Therefore, we do NOT want the %s in there at 
all. 
Then, experimenting with xfce4-terminal (same as your Terminal) with -e 
alpine, etc. I found that it had to have single quotes around the 
argument to the -e, just as Gerald L had said. Trouble is, you can't do 
that since pan is going to put the mailto: URL AFTER whatever command you 
specify in the preferences. So, again taking a tip from Duncan, I wrote 
the following little Perl glue program and called it alpine_helper.pl. 
Here it is:
#!/usr/bin/perl -w
use strict;
my $url_from_pan = $ARGV[0];
my $command = "xfce4-terminal -e 'alpine -url " . $url_from_pan . "'";
system($command);

You will use Terminal instead of xfce4-terminal.
Save this file and make it executable (chmod 755 alpine_helper.pl).

The whole point of this little program is to sneak the "alpine -url ", 
plus the URL passed by pan, inside the required pair of single quotes 
which have to surround the argument of the "-e" when you use Terminal (or 
xfce4-terminal in my case).
I put this program in my bin directory in my home directory, i.e., /home/
david/bin. So in my pan preferences for the Mail Reader Custom Command, I 
just put:
/home/david/bin/alpine_helper.pl
That does the trick.
-- David





reply via email to

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