I got this tip, but haven't tried it yet. Here it is: "I love pinto beans now that I discovered the right way to do them! No gas! Soak overnight (8-12 hours); pour off soaked water and rinse beans. Place beans in pot with enough water to cover them and add 1 spoonful of Baking Soda (very important!) then bring to a boil. Pour off boiled water and rinse again. Place back in pot, cover with plenty of water and bring to a boil, then turn down and simmer for several hours. The baking soda, rinsing, and changing water does something to prevent gas."
I have tried putting baking soda in my beans while cooking them. Sometimes it worked but more often it didn't. Maybe the added step of pouring off the soda water and cooking in new water will make a difference. I am making chilli this week, so I'll let you know how it turns out.