I saw the post about repelling codling moths and I thought I would pass this on:
When I took my Master Gardener classes, I asked Colorado's bug guru (Dr. Cranshaw) about companion planting to repel pest insects. Here is what I learned: Insects have a very limited sense of smell, they can smell the opposite sex and their host plant/food, but that is about all. But they can smell those specific things for miles, in the case of beetles that fly in annually from farther south, maybe for as much as a hundred miles downwind. So basically we cannot plant to repel, only to attract. He said that mixed companion plantings are still a good idea because it creates a healthier more diverse enviroment than a monoculture, and is more likely to attract and support beneficial insects and organisms. We can also plant "trap" crops to attract pests away from the plants we are trying to protect to something they like better that we can spare.
For myself, this coming year I am going to get serious about crop rotation in the vegetable garden, and include annual plants to attract beneficials with my annual vegetables - but I'm going to keep the perennial herbs that supposedly repel pests in the perennial flower bed. They have probably been "repelling" by attracting beneficials, but mixing annuals and perennials is more trouble than it is worth.
If you have an area in your yard that you can let go wild, that'll help too. Or incorporate native plants into your landscape wherever possible. Plants that attract beneficial wasps & flies don't always have to be right smack next to the plant that you're trying to protect. But what is key, is that they have to be blooming to attract the pollen eating beneficial predators. And the predators have differently timed life cycles. So a native perennial or two that blooms early will help in the beginning of the season, while you're waiting for the annuals to do their thing. And late bloomers will help keep the good guys around when the annuals poop out.
Some wasps & flies grab & eat garden pests outright, but most nab them, lay an egg on them, and stash them somewhere for the hatching larva to eat. Or they just lay the egg on them in the garden, and go on their merry way. So if you decide to go this route, having the wild area (or a trap area) to relocate what caterpillars & such that you do find in the garden is important. Ya never know if the 'pillar you're squishing has an egg on it that you need to build up predator populations.
Even with "organic" bug treatments, you have to do your homework on how & what they kill. Whether you're using Bt, DE, Neem, soap concoctions, etc., you have to be careful not to kill off or drive off the predators that you'll want around. If you build up your good bug & bird populations, which takes time & consideration & much teeth gritting- eventually (if nature wasn't completely run off in your area) you won't need much of that stuff, if any of it. Certainly you'll have some pests & damage, they'll still be around, but it'll be manageable and/or acceptable.
I tried Bt when it first became available on Tomato hornworms. The Tomato hornworms dropped dead, and so did the Swallowtails on the dill 20 feet away. I haven't used it since. I haven't had any problems with Tomato hornworms at this location, even though I always have hawkmoths. I think maybe the caterpillars live in the Petunias or 4 O'clocks I plant instead. I definately get little catterpillars on the petunias, usually the same color as the blossom they are eating. I try to have some rocky habitat for lizards near the petunias - they eat the caterpillars and are entertaining to watch.