[TxMt] Re: sudden latex tidy and latex compiling errors

René Schwaiger sanssecours at f-m.fm
Wed Feb 11 13:01:01 UTC 2015


Hi Allan,

> On 11 Feb 2015, at 10:56 , Allan Odgaard <mailinglist at textmate.org> wrote:
> 
> On 11 Feb 2015, at 15:38, René Schwaiger wrote:
> 
>>> Can't locate YAML/Tiny.pm in @INC […]
>> […] You need to install PYAML for the command to work.
> 
> Is it possible to place the YAML library in the bundle’s support folder and add that to perl’s include path?

I just did that in the latest commit [GitHub]. Thanks for the helpful suggestion.

[GitHub]: https://github.com/textmate/latex.tmbundle/commit/35233d4eb14d46fa553cc044959b8d15656a7ccd

I would like to remove the library code from the bundle sometimes in the future tough. Is there a nice way to install external dependencies via TextMate? The code I came up with:

```bash
{
    # Try to run `latexindent`
    latexindent -c=/tmp "${TM_FILENAME}"
} || {
    # `latexindent` failed. Most likely this was caused by `Tiny::YAML` not
    # being installed
    osascript -e "do shell script \"cpan App::cpanminus && cpanm YAML::Tiny\"\
                  with administrator privileges" > /dev/null || {
            exit_show_tool_tip "Could not install YAML::Tiny"
        }
    latexindent -c=/tmp "${TM_FILENAME}"
}
```

has the problem, that there is no feedback for the installation process. Comments would be appreciated.

Kind regards,

  René


More information about the textmate mailing list