Excerpts from William Morgan's message of Wed Jan 30 10:29:30 -0700 2008:
> Reformatted excerpts from John Bent's message of 2008-01-25:
> > The hook works (system "open \'#{filename}\'"), but sup thinks it is
> > failing.  I get a message saying view failed, displaying as text.
> > Maybe it should be (! system "open \'#{filename}\'") ?
> 
> Weird. Kernel#system returns true if the command succeeded and false
> otherwise, so it should work as is.
> 
> You could try:
>   system "open '#{filename}'"
>   $?.success?
> 
same problem.  the attachment is successfully opened but sup thinks it
failed and sup displays it as text.

> But there's no reason that should work and the original shouldn't. You
> don't have a debugging print statement or anything like that as the
> final line of the hook, do you?
> 
nope, just the exact two lines you supplied above.

I wonder if the problem is that system isn't correctly understanding
the return value from open?  

tangerine:~>open K.png
tangerine:~>echo $?
0

hmmm, I would think 0 is the expected success value?  How could I reverse
true and false?  I'm curious to try that but 
! $?.success? 
$?.success?true:false 
don't work, they error out and sup defaults to run-mailcap.

John
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to