Quantcast

BibDesk completions in TextMate

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

BibDesk completions in TextMate

jiho
Hello everyone,

I have been using the  BibDesk completions in TextMate program found  
on this page:
        http://bibdesk.sourceforge.net/wiki/index.php/Other_Applications
with TextMate last month and everything worked.

Now when I use the command "Bibdesk Do Completion" I get:
        /tmp/temp_textmate.UNeFiD:18: undefined method `[]' for nil:NilClass  
(NoMethodError)

I don't remember a TextMate update in the meantime, however I did  
update Bibdesk and modified my bib file. Currently the problem occurs  
with the latest versions of TM, BibDesk, the completion program and an  
up to date OS X.

I am willing to do what's necessary to help debug that, I just don't  
know where to start. My bib file is there in case it helps:
        http://jo.irisson.free.fr/dropbox/irisson_bib.bib.zip

Thanks in advance for your help.

JiHO
---
http://jo.irisson.free.fr/



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BibDesk completions in TextMate

jiho
More on this:

On 2008-August-06  , at 13:59 , jiho wrote:

> Now when I use the command "Bibdesk Do Completion" I get:
> /tmp/temp_textmate.UNeFiD:18: undefined method `[]' for  
> nil:NilClass (NoMethodError)


However, using "Build cite with Bibdesk", the completion works. If  
that helps.

JiHO
---
http://jo.irisson.free.fr/



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BibDesk completions in TextMate

Maxwell, Adam R
On 08/06/08 11:19, "jiho" <[hidden email]> wrote:

> More on this:
>
> On 2008-August-06  , at 13:59 , jiho wrote:
>
>> Now when I use the command "Bibdesk Do Completion" I get:
>> /tmp/temp_textmate.UNeFiD:18: undefined method `[]' for
>> nil:NilClass (NoMethodError)
>
>
> However, using "Build cite with Bibdesk", the completion works. If
> that helps.

That's odd, since they should be doing the same thing.  Can you post the
BibDesk DO Completion .tmCommand script?  It's working fine for me with
latest TextMate and svn checkout of bundles.

--
Adam


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BibDesk completions in TextMate

jiho

On 2008-August-06  , at 14:58 , Maxwell, Adam R wrote:

>> On 2008-August-06  , at 13:59 , jiho wrote:
>>
>>> Now when I use the command "Bibdesk Do Completion" I get:
>>> /tmp/temp_textmate.UNeFiD:18: undefined method `[]' for
>>> nil:NilClass (NoMethodError)
>>
>>
>> However, using "Build cite with Bibdesk", the completion works. If
>> that helps.
>
> That's odd, since they should be doing the same thing.  Can you post  
> the
> BibDesk DO Completion .tmCommand script?  It's working fine for me  
> with
> latest TextMate and svn checkout of bundles.

I'll try updating my bundles and support directory to svn versions too.

I just reinstalled the tmCommand too so it should be the same version  
you have apart from the location of the binary. Here it is:

#!/usr/bin/env ruby -wKU

# for TextMate.exit
require ENV["TM_SUPPORT_PATH"] + "/lib/exit_codes.rb"
require ENV["TM_SUPPORT_PATH"] + "/lib/ui.rb"

SUPPORT = ENV['TM_SUPPORT_PATH']
DIALOG = ENV['DIALOG']

require SUPPORT + '/lib/escape'
require SUPPORT + '/lib/osx/plist'

searchTerm = STDIN.read

latexMaster = ENV['TM_LATEX_MASTER']

# see if latex master is relative
if latexMaster[1,1] != "/" then
   # try to find a base directory
   projectDir = ENV['TM_PROJECT_DIRECTORY']
   if projectDir == ""
     projectDir = ENV['TM_DIRECTORY']
   end
   if projectDir != ""
     latexMaster = projectDir + "/" + latexMaster
   end
end

# omit -s to return all items
CMD = '"$HOME"/Library/Application\ Support/TextMate/Support/
BibDeskTMCompletions ' + (searchTerm == "" ? "" : "-s #{searchTerm}")  
+ ' -t "$TM_FILEPATH" ' + latexMaster

# returns an XML plist
plist = `#{CMD}`

# cribbed from example on pastie
res = OSX::PropertyList::load(`#{e_sh DIALOG} -up #{e_sh plist}`)

# this keeps us from overwriting on cancel
TextMate.exit_discard unless res.has_key? 'selectedMenuItem'

# insert valueForKey:@"citeKey"
print res['selectedMenuItem']['citeKey']


JiHO
---
http://jo.irisson.free.fr/



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BibDesk completions in TextMate

jiho
In reply to this post by Maxwell, Adam R

On 2008-August-06  , at 14:58 , Maxwell, Adam R wrote:

> It's working fine for me with
> latest TextMate and svn checkout of bundles.

same error with a fresh svn checkout of the bundles, the LaTeX one in  
particular.

JiHO
---
http://jo.irisson.free.fr/



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BibDesk completions in TextMate

Maxwell, Adam R
In reply to this post by jiho



On 08/06/08 12:16, "jiho" <[hidden email]> wrote:

>
> On 2008-August-06  , at 14:58 , Maxwell, Adam R wrote:
>
>>> On 2008-August-06  , at 13:59 , jiho wrote:
>>>
>>>> Now when I use the command "Bibdesk Do Completion" I get:
>>>> /tmp/temp_textmate.UNeFiD:18: undefined method `[]' for
>>>> nil:NilClass (NoMethodError)
>>>
>>>
>>> However, using "Build cite with Bibdesk", the completion works. If
>>> that helps.
>>
>> That's odd, since they should be doing the same thing.  Can you post
>> the
>> BibDesk DO Completion .tmCommand script?  It's working fine for me
>> with
>> latest TextMate and svn checkout of bundles.
>
> I'll try updating my bundles and support directory to svn versions too.
>
> I just reinstalled the tmCommand too so it should be the same version
> you have apart from the location of the binary. Here it is:

Looks like it's using a different method to get the latex master file.  If
what you posted is currently on my site, I need to update it; sorry about
that.  Here's my current one (note the added 'require' line and latexMaster
variable):

#!/usr/bin/env ruby -wKU

# for TextMate.exit
require ENV["TM_SUPPORT_PATH"] + "/lib/exit_codes.rb"
require ENV["TM_SUPPORT_PATH"] + "/lib/ui.rb"

SUPPORT = ENV['TM_SUPPORT_PATH']
DIALOG = ENV['DIALOG']
 
require SUPPORT + '/lib/escape'
require SUPPORT + '/lib/osx/plist'
require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/LaTeXUtils.rb"

latexMaster = LaTeX.master(ENV['TM_LATEX_MASTER'] || ENV['TM_FILEPATH'])
if !latexMaster
  latexMaster = ""
end

searchTerm = STDIN.read

# omit -s to return all items
CMD = '"$HOME"/BuildProducts/Release/BibDeskTMCompletions ' + (searchTerm ==
"" ? "" : "-s #{searchTerm}") + ' -t "$TM_FILEPATH" ' + latexMaster

# returns an XML plist
plist = `#{CMD}`

# cribbed from example on pastie
res = OSX::PropertyList::load(`#{e_sh DIALOG} -up #{e_sh plist}`)

# this keeps us from overwriting on cancel
TextMate.exit_discard unless res.has_key? 'selectedMenuItem'

# insert valueForKey:@"citeKey"
print res['selectedMenuItem']['citeKey']


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BibDesk completions in TextMate

jiho

On 2008-August-06  , at 15:26 , Maxwell, Adam R wrote:

> On 08/06/08 12:16, "jiho" <[hidden email]> wrote:
>
>> On 2008-August-06  , at 14:58 , Maxwell, Adam R wrote:
>>
>>>> On 2008-August-06  , at 13:59 , jiho wrote:
>>>>
>>>>> Now when I use the command "Bibdesk Do Completion" I get:
>>>>> /tmp/temp_textmate.UNeFiD:18: undefined method `[]' for
>>>>> nil:NilClass (NoMethodError)
>>>>
>>>> However, using "Build cite with Bibdesk", the completion works. If
>>>> that helps.
>>>
>>> That's odd, since they should be doing the same thing.  Can you post
>>> the
>>> BibDesk DO Completion .tmCommand script?  It's working fine for me
>>> with
>>> latest TextMate and svn checkout of bundles.
>>
>> I'll try updating my bundles and support directory to svn versions  
>> too.
>>
>> I just reinstalled the tmCommand too so it should be the same version
>> you have apart from the location of the binary. Here it is:
>
> Looks like it's using a different method to get the latex master  
> file.  If
> what you posted is currently on my site, I need to update it; sorry  
> about
> that.  Here's my current one (note the added 'require' line and  
> latexMaster
> variable):


yay it works. I reinstalled the command by double clicking it and  
telling TM to use the new one. So what I posted is probably what is  
currently online indeed.

thanks a lot.

JiHO
---
http://jo.irisson.free.fr/



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BibDesk completions in TextMate

Adam R. Maxwell

On Aug 6, 2008, at 1:24 PM, jiho wrote:

>
> On 2008-August-06  , at 15:26 , Maxwell, Adam R wrote:
>
>> Looks like it's using a different method to get the latex master
>> file.  If
>> what you posted is currently on my site, I need to update it; sorry
>> about
>> that.  Here's my current one (note the added 'require' line and
>> latexMaster
>> variable):
>
>
> yay it works. I reinstalled the command by double clicking it and
> telling TM to use the new one. So what I posted is probably what is
> currently online indeed.
The one online is actually up to date, but I suspect that your local  
modification of the path is causing TextMate to keep the old version  
of the ruby script instead (I see the same problem on my home  
computer).  I think you can fix it by messing around with the  
LaTeX.tmbundle innards in ~/Library/Application Support/TextMate/
Bundles (and maybe Pristine Copy?), but it's probably easier just to  
copy the script.

ISTR making these fixes a few months ago when it broke due to changes  
in the LaTeX bundle, but I didn't realize installing it by double-
clicking would be a problem.  Sorry about that, but I'm actually not  
sure if I can fix it since TM seems to use a diff mechanism for bundle  
changes.

--
Adam


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BibDesk completions in TextMate

jiho

On 2008-August-07  , at 00:34 , Adam R. Maxwell wrote:

> On Aug 6, 2008, at 1:24 PM, jiho wrote:
>
>> On 2008-August-06  , at 15:26 , Maxwell, Adam R wrote:
>>
>>> Looks like it's using a different method to get the latex master
>>> file.  If
>>> what you posted is currently on my site, I need to update it; sorry
>>> about
>>> that.  Here's my current one (note the added 'require' line and
>>> latexMaster
>>> variable):
>>
>> yay it works. I reinstalled the command by double clicking it and
>> telling TM to use the new one. So what I posted is probably what is
>> currently online indeed.
>
> The one online is actually up to date, but I suspect that your local  
> modification of the path is causing TextMate to keep the old version  
> of the ruby script instead (I see the same problem on my home  
> computer).  I think you can fix it by messing around with the  
> LaTeX.tmbundle innards in ~/Library/Application Support/TextMate/
> Bundles (and maybe Pristine Copy?), but it's probably easier just to  
> copy the script.

well I removed the .tmDelta in the LaTeX.tmbundle of my home  
directory. But maybe there was something else funky going on.

> ISTR making these fixes a few months ago when it broke due to  
> changes in the LaTeX bundle, but I didn't realize installing it by  
> double-clicking would be a problem.  Sorry about that, but I'm  
> actually not sure if I can fix it since TM seems to use a diff  
> mechanism for bundle changes.

I indeed find this part of bundle handling to be one where TM is less  
than ideal. For small modifications by the user this delta system is a  
good idea and works surprisingly well. But as soon as the  
modifications are more extensive or that the bundle gets a major  
update, then it does not scale. There was a discussion on TM's list  
regarding the possible use of a distributed version control system to  
replace this ad-hoc one i.e. each bundle would be a git repository and  
git itself would handle the merges between the user's changes and  
upstream updates. With a decent UI for conflict resolution this would  
probably be excellent. We'll see what the future gives us.

Sorry to have bothered you with the issue then, since it was specific  
to my system, and thanks for the work on BibDesk and on that.

JiHO
---
http://jo.irisson.free.fr/



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bibdesk-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Loading...