[TxMt] Re: .tm_properties Question

Walter Lee Davis waltd at wdstudio.com
Wed Oct 10 13:59:33 UTC 2012


On Oct 10, 2012, at 4:24 AM, dAlembert wrote:

> Hello,
> 
> recently I've been trying different things with project-related
> tm_properties files. To help me better understand what I'm doing, could
> anybody please explain the background behind different kinds of quotation
> marks like " or ' ?
> 
> For example it took me some time to figure out that while
> 
>   projectDirectory     = "$CWD"
> 
> uses " marks, setting of a variable afterwards
> 
>   TM_LATEX_MASTER      = '${CWD}/document.tex'
> 
> will only work properly if ' is used (at least it didn't work for me with "
> when doing the LaTeX run from subdirectories).
> 
> What is the technical difference between those " and ' ?

Here's how this works in any C-like language (probably other places too, this is just all I have direct experience with). Anything set within double-quotes will be evaluated for variables, and replacement will take place from the current scope. Anything set within single-quotes will not be evaluated at all. So in your second example, the constant is being set to a variable name, but that variable isn't going to be evaluated in the current scope, only later, when the constant is substituted into another expression, will that variable be evaluated in whatever scope it finds itself in.

Walter



More information about the textmate mailing list