Are you bugged by the [All Mails] folder in your Gmail IMAP account showing up in Mail.App? Maybe because it shows duplicates for every search your make, or maybe because the "unread" count is doubled? Well, me too!
To my delight, I just stumbled on the Gmail Labs feature called Advanced IMAP Controls. Among other things, this feature lets selectively enable or disable labels when using IMAP to access your Gmail account -- so yes, you can get ride of the annoying [All Mails] folder (and other Gmail folders, if you wish) from Mail.App.
To access the Gmail Labs options, go to your Gmail Settings page on the Gmail website; on that page, Labs is the last tab on the right. Advanced IMAP Controls appears a fair ways down the page; enable it, then click the Save Changes button. Now click on the Labels tab, and uncheck the Show in IMAP box next to each label that you'd like to keep out of Mail.app.
Finally! It's incredible how a small thing like this can make your life easier. I hope Google will push it to the main product, as it's really useful.
[robg adds: If you'd like to try this, I suggest doing so quickly -- this hint has been in the queue since September 15th, as the Advanced IMAP Controls feature had disappeared when I originally tried to test it around that time. It's just reappeared, but it may vanish again -- the Labs features are experimental, after all. The good news is that if you enable it now, even if the feature goes away again, the Show in IMAP checkboxes will probably remain (according to Fraggle, this is what happened to his account when the feature vanished the first time).]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080915174303761