From: johnbent@lanl.gov (John Bent)
Subject: [sup-talk] missing run-mailcap
Date: Wed, 30 Jan 2008 10:54:22 -0700 [thread overview]
Message-ID: <1201715536-sup-6254@tangerine.lanl.gov> (raw)
In-Reply-To: <1201714011-sup-6178@south>
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
next prev parent reply other threads:[~2008-01-30 17:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 16:40 John Bent
2008-01-22 22:33 ` John Bent
2008-01-24 21:40 ` John Bent
2008-01-24 23:26 ` William Morgan
2008-01-24 23:52 ` John Bent
2008-01-25 0:17 ` William Morgan
2008-01-25 0:57 ` Grant Hollingworth
2008-01-25 4:40 ` John Bent
2008-01-26 0:35 ` John Bent
2008-01-30 17:29 ` William Morgan
2008-01-30 17:54 ` John Bent [this message]
2008-01-30 18:26 ` William Morgan
2008-01-30 18:35 ` John Bent
2008-02-03 3:01 ` William Morgan
-- strict thread matches above, loose matches on Subject: below --
2008-01-04 23:45 Giorgio Lando
2008-01-04 23:59 ` Giorgio Lando
2008-01-05 0:13 ` William Morgan
2008-01-05 1:01 ` Giorgio Lando
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1201715536-sup-6254@tangerine.lanl.gov \
--to=johnbent@lanl.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox