<br><br><div class="gmail_quote">On Mon, Jul 5, 2010 at 19:52, Sam Tobin-Hochstadt <span dir="ltr"><<a href="mailto:samth@ccs.neu.edu">samth@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
This seems to work for me:<br>
<br>
#lang racket<br>
(require racket/runtime-path (for-syntax racket/file))<br>
(define-runtime-path-list p (find-files (ë (x) (regexp-match "[.]tex$" x))))<br>
<br>
Probably you were missing the `for-syntax' require.<br></blockquote><div><br>Ah, that is why! Thanks a lot!<br><br>Now another question:<br>I'm in fact using `find-files' inside a function, say `find-files-ex', that is declared in the same file and used in the `define-runtime-path-list' call.<br>
The problem is that this function must be available both at compile time and at runtime because of `define-runtime-path-list'.<br><br>I did not find anything that could do that as is, so I made this macro:<br><br>(define-syntax-rule (define-also-for-syntax head body ...)<br>
(begin <br> (define-for-syntax head body ...)<br> (define head body ...)<br> ))<br><br>to avoid duplication of the function code.<br>But I feel like it may not be the right thing to do. Am I missing something?<br>
</div></div><br>