[TxMt] Re: scriptmate.rb question
Alexander Ross
alex.j.ross at gmail.com
Fri Mar 16 02:53:50 UTC 2007
Hey Patrick,
Sorry about the delay, but this is fixed in latest svn. I was using
IO::open incorrectly, which was causing the bug. The erroneous nil
is gone now too.
–Alex
On Mar 14, 2007, at 3:25 AM, Patrick Gundlach wrote:
> Hi Allan, others,
>
>>> [...]
>>> is trying to get 4 parameters from @command.run, but UserCommand#run
>>> only returns 3. A related question: is it possible to get a pid from
>>> popen3?
>>
>> I recently wrote a custom version for popen3 to get the pid (so that
>> we could provide the ⌃C-break functionality) -- likely the subclass
>> you refer to (UserScript) needs appropriate updating (I’ll check it
>> out later).
>
> I've checked out todays support directory and have a few problems:
>
> ----------------
> $:.unshift ENV['TM_SUPPORT_PATH'] + "/lib"
>
> require 'scriptmate'
>
> cmd_mate('ls')
> ----------------
>
> gives me
>
> /Users/pg/Library/Application Support/TextMate/Support/lib/
> scriptmate.rb:106:in `emit_html': undefined method `fcntl' for [#,
> #]:Array (NoMethodError)
> from /Users/pg/Library/Application Support/TextMate/Support/lib/
> scriptmate.rb:106:in `each'
> from /Users/pg/Library/Application Support/TextMate/Support/lib/
> scriptmate.rb:106:in `emit_html'
> from /Users/pg/Library/Application Support/TextMate/Support/lib/
> scriptmate.rb:46:in `cmd_mate'
> from parse_texrun.rb:10
>
> when I change line 56 in scriptmate.rb to
>
> return stdout, stderr, File.open('/dev/null'), pid
>
> (I vaguely remember this being in the old scriptmate.rb), I get an
> output with a surprising 'nil' at the end:
>
>
> .... <--- OK
> .... <--- OK
> nil <--- unwanted
>
>
> Thanks so far,
>
> Patrick
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
More information about the textmate
mailing list