I’m using 2.0-alpha.9443
A while back, converting Markdown to HTML with ⌃⇧H quit working. It just results in a blank document.
I finally got irritated enough to investigate and I tracked it down to SmartyPants. That is, if I set TM_SMARTYPANTS to `/bin/cat`, the Markdown command to convert starts working.
The only copy I seem to have is at `~/Library/Application Support/TextMate/Pristine Copy/Support/bin/SmartyPants.pl`. It doesn’t seem to be included with the Markdown bundle. Is that right? Any ideas why it’s not being found when the command runs?
I think this started with a9423, which says “A bunch of (work in progress) refactoring has caused some changes to executing commands”.
On 10 Jul 2013, at 16:25, Rob McBroom wrote:
[…] I finally got irritated enough to investigate and I tracked it down to SmartyPants. That is, if I set TM_SMARTYPANTS to `/bin/cat`, the Markdown command to convert starts working.
It should be found in the Bundle Support bundle, Support/bin, which is added to PATH
Try ⌃R on each of the following 3 lines to debug your environment:
which SmartyPants.pl ls -l "$TM_SUPPORT_PATH/bin/SmartyPants.pl" echo $PATH
On Wed Jul 10 2013 at 12:42:50, Allan Odgaard wrote:
Try ⌃R on each of the following 3 lines to debug your environment:
which SmartyPants.pl ls -l "$TM_SUPPORT_PATH/bin/SmartyPants.pl" echo $PATH
That was it. Long ago, I had defined my own PATH in the prefs so I could include `/usr/local/bin`. Disabling PATH fixes it. So is there a safer way to add `/usr/local/bin`?
Thanks.
On 10 Jul 2013, at 19:29, Rob McBroom wrote:
[…] is there a safer way to add `/usr/local/bin`?
Set it to: $PATH:/usr/local/bin
The support bundle’s bin directory is added to the PATH variable via a bundle setting, the change around alpha.9423 was that user variables now have higher priority, so they can overwrite bundle variables. I hadn’t considered the PATH issue you experienced.
The change was motivated by allowing setting e.g. TM_COMMENT_START/STOP in .tm_properties instead of having to edit bundle (settings) items for customization.
For the records, new commands should not be written to rely on PATH, e.g. the SmartyPants.pl invocation should instead be "${TM_SMARTYPANTS:-$TM_SUPPORT_PATH/bin/SmartyPants.pl}".
On Wed Jul 10 2013 at 14:15:25, Allan Odgaard wrote:
The change was motivated by allowing setting e.g. TM_COMMENT_START/STOP in .tm_properties instead of having to edit bundle (settings) items for customization.
Makes sense. I’m sure the change is worth it. Thanks again.