On Thu, 29 Mar 2012 13:27:36 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote: > On Thu, Mar 29 2012, Mark Anderson <MarkR.Anderson@amd.com> wrote: > > On Tue, 27 Mar 2012 14:24:36 -0600, Mark Anderson <MarkR.Anderson@amd.com> wrote: > >> I was looking for a function which would find a buffer based on one of > >> my saved searches, and perform the search if it didn't exist. > >> > >> I've gotten it a bit closer, if I perform the search that matches a > >> saved search, then this routine will find it because of the magic in > >> notmuch-search-buffer-title, but perhaps someone else feels up to > >> searching through the saved searches directly? > > Hey, Mark. I think you can be a little simpler. The title for search > buffers is based on the search, so a buffer will always be reused for an > identical search. You don't need to do any fancy buffer searching. Hi, I believe Mark's point was just switching to the buffer if it exists, *without* refreshing or doing the query, and only doing regular notmuch-search if a buffer doesn't exist yet. BR, Jani.