Dear List,
I know I am probably doing something silly, but I can't seem to solve this seemingly trivial problem.
I've installed the restructured text bundle, and the restructured text tools themselves. the reST tools work fine from the command line. My environment.plist looks like:
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>DISPLAY</key> <string>:0.0</string> <key>PATH</key> <string>/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/teTeX/bin/i386-apple-darwin-current:/Users/nicholas/bin</string> </dict> </plist>
On running the rst2html command from the bundle, I get the error message:
Couldn't find rst2html.py
You can either set the TM_RST2HTML variable to the full path of your docutils (docutils.sourceforge.net) installation (e.g. /Library/Frameworks/Python.framework/Versions/2.4/bin or set the PATH variable to include the path of the docutils converters.
Locations searched:
/Applications/TextMate.app/Contents/SharedSupport/Support/bin/CocoaDialog.app/Contents/MacOS /sw/bin /sw/sbin /bin /sbin /usr/bin /usr/sbin /usr/texbin /usr/local/bin /usr/X11R6/bin /Applications/TextMate.app/Contents/SharedSupport/Support/bin
If I create a variable TM_RST2HTML and set it to: /Library/Frameworks/Python.framework/Versions/Current/bin/
I get an error saying that that path cannot be found (even though I *know* it exists.
(the relevant utilities exist both there and in my ~/bin)
Can anyone explain what is wrong?
Best wishes,
Nicholas
On 18. Jun 2007, at 22:17, Nicholas Cole wrote:
On running the rst2html command from the bundle, I get the error message:
Couldn't find rst2html.py
You can either set the TM_RST2HTML variable to the full path of your docutils (docutils.sourceforge.net) installation (e.g. /Library/Frameworks/Python.framework/Versions/2.4/bin or set the PATH variable to include the path of the docutils converters. [...] I get an error saying that that path cannot be found (even though I *know* it exists.
(the relevant utilities exist both there and in my ~/bin)
Can anyone explain what is wrong?
The error is incorrect. You should set TM_RST2HTML to include rst2html.py.
I updated the bundle.
As for path, see http://macromates.com/textmate/manual/ shell_commands#search_path (in this case, it is the shell startup path used, which by default does not inherit from environment.plist (due to /etc/profile resetting the variable))
Dear Alan,
Thanks for your help. Re-reading search path section of the manual, I also solved a path mystery of my own. My .bash_profile file began with the line:
[ -f $HOME/.bashrc ] && source .bashrc
It should, of course, have been
[ -f $HOME/.bashrc ] && source $HOME/.bashrc
Which explains why the path that I had in .bashrc was not being read by textmate.
I don't know whether that .bash_profile is standard or was written by some utility or other - I don't think it can have been me since on my own machine I probably wouldn't have worried about testing whether or not .bashrc existed.
Best wishes,
Nicholas