[Bese-devel] TAL template searching problem

Jan Rychter jan at rychter.com
Wed Oct 18 10:50:21 UTC 2006


This is what I wrote on 02 Feb 2006:
> I noticed that when you use <tal:include> tags, the normal root
> directories of your filesystem-generator do not get searched. I suspect
> this is unintended, but I'm not submitting a darcs patch, as it might
> break some installations (you will no longer be able to include files
> from the directory where the including template is, unless that
> directory is in your list of root-directories).
> 
> The culprit is:
> 
> (def-tag-handler tal:include (tag)
> [...]
>         (with-tal-compile-environment (generator)
>           `(funcall (load-tal ,generator ,(merge-pathnames template-name *tal-truename*))
>                     (extend-environment (tal-env ,@(augmented-env)) tal-environment)
>                     ,generator))))))
> 
> ... and you probably want:
> 
>         (with-tal-compile-environment (generator)
>           `(funcall (load-tal ,generator ,template-name)
>                     (extend-environment (tal-env ,@(augmented-env)) tal-environment)
>                     ,generator))))))
> 
> ... since it's supposed to be the generator's job to deal with
> directories.

Well, half a year later I got bitten by the same problem again when
updating yaclml. So, how about making the following change, please?

{
hunk ./src/tal/handlers.lisp 89
-          `(funcall (load-tal ,generator ,(merge-pathnames template-name *tal-truename*))
+          `(funcall (load-tal ,generator ,template-name)
}

--J.



More information about the bese-devel mailing list