From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Jan 2008 09:29:30 -0800 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201307667-sup-2659@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local> <1201235901-sup-7426@tangerine.lanl.gov> <1201307667-sup-2659@tangerine.lanl.gov> Message-ID: <1201714011-sup-6178@south> 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? 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? > Also, I added the \' because I noticed before that sometimes filename > has spaces in it and then open won't work. Good point. Backslashes optional though. :) -- William