[TxMt] GTD Bundle Commands not working

Adam Potthast adamqp at freeminds.net
Wed Sep 20 05:44:41 UTC 2006


No problem.

In fact (though I'm sure this is no news to you), if you replace the  
line with this:

       if (fileName[-3,3] == "gtd") and (fileName != "contexts.gtd")  
and (fileName != "excluded.gtd") and (myList.contains(fileName))

and add the following code you already had written for the Active  
List command:

class ExList
   def initialize
     @values = []
   end
   def contains(test)
     #puts @values.class
     found = true
     @values.each do |item|
       if test == item.chomp
         found = false
       end
     end
     return found
   end
   def add(item)
     @values.push item
   end
   def print
     puts @values
   end
end

xFile = File.open($myPath+"/excluded.gtd", "r")

myList = ExList.new

xFile.each do |line|
   myList.add(line)
end

Then the Export to Geektool command respects excluded.gtd as well.

Thanks for the great bundle -- it's a big part of my day.

Adam



On Sep 20, 2006, at 12:07 AM, Mike Mellor wrote:

> Adam -
>
> Good catch!  I made the change and have updated the repository.   
> Thanks for the help, and thanks for the feedback!
>
> Mike
>
>
> On Sep 19, 2006, at 8:41 PM, Adam Potthast wrote:
>
>> Mike,
>>
>> I may have solved the problem.  I took a look at the Export to  
>> Geektool command and it looks like it was trying to process  
>> excluded.gtd as well.  So I changed line 35 from:
>>
>>       if (fileName[-3,3] == "gtd") and (fileName != "contexts.gtd")
>>
>> to
>>
>>       if (fileName[-3,3] == "gtd") and (fileName !=  
>> "contexts.gtd") and (fileName != "excluded.gtd")
>>
>> Now it seems to work fine.
>>
>> I might work on this command a little so that it takes account of  
>> what one wants to ignore in excluded.gtd as well.  Given that I  
>> know nothing about SVN, would it be welcome to send changes to you?
>>
>> AP
>
>
> ______________________________________________________________________
> 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