Tim Kamanin shows how to use a view template file to theme a views exposed filter in a block. This is very useful since frequently you do not want the block to have the same functionality as the page.
If you build a View with an exposed filter you may want to put this filter in a block. This is can be done to separate filter from view results and to display exposed filter in any part of your website.
But what if you want to theme this block and change the way exposed filter behaves, what do you do?
Since there is no any mention of “exposed filter in a block template file” in Views Theming information list, it is a bit tricky to guess which file to edit and how to name it. Here is what you should do:
This solution should work for both Drupal 6 and D7.

Comments
Update:
I took a look at this and think that it needs some additional work both in the tip and in Drupal. Point one is that the Drupal 7 GUI does not show exposed filter as block in the Master section of the view gui. You have to click on the Page section to see the control. Secondly this is not a real solution because exposing the filter in a block removes it from the page view. So you then have to go back and embed the block in the view template. I don't believe this is the type of behavior that most want or expect.