I've been thinking it might be nice to have an occur-dwim command. 1. If the selected region has multiple lines, it would search only inside the region. 2. If the selected region has one line or less, it would use the region as the search string. 3. If there's no selection it do the usual occur.