Two days ago, Eric Tanter wrote: > Thanks John, that's very helpful! > > Any idea about a whole-file racketify in DrRacket?
>From the quick hacks dept, which I think is very applicable to such jobs of converting lots of code: what I do in these cases is first create a file that holds all of the files that you need to convert. Then I use Emacs with lots of (regexp) searching and keyboard macros. For example, instead of a keybinding, I just record one key that looks for "(let ((" then another key that fixes the paren shapes. Having it all in a single file makes it easy to do this in a semi-automated way: it's obviously not a proper solution, but if the process is easy enough to the point of a quick glance and a keypress, then the overall effort is much smaller than writing a proper code refactoring tool which is at risk of being a single-use thing anyway. After that's done, I extract the files. (I have a small script that creates a text file from a bunch of given files, runs a command on that file, and then extracts the modified files back to where they were. It makes it easy to do global edits like spell checking, tabs, etc.) (Oh, and I should of course say that this depends on having a very convenient way to deal with keyboard macros, something that Emacs in its default configuration doesn't have.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! ____________________ Racket Users list: http://lists.racket-lang.org/users