From 0059853728681cb3dfb23fb3420bcfe07cefcc5f Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 30 Mar 2012 00:57:44 +0300 Subject: [PATCH] Re: Goto command for existing search windows --- 60/ddaa5096ea9ab6b0f460d9506670b74f910fe2 | 92 +++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 60/ddaa5096ea9ab6b0f460d9506670b74f910fe2 diff --git a/60/ddaa5096ea9ab6b0f460d9506670b74f910fe2 b/60/ddaa5096ea9ab6b0f460d9506670b74f910fe2 new file mode 100644 index 000000000..5792420e6 --- /dev/null +++ b/60/ddaa5096ea9ab6b0f460d9506670b74f910fe2 @@ -0,0 +1,92 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 4B241431FAF + for ; Thu, 29 Mar 2012 14:57:57 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 1O6p4Q-nTAOY for ; + Thu, 29 Mar 2012 14:57:53 -0700 (PDT) +Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com + [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 3E511431FAE + for ; Thu, 29 Mar 2012 14:57:53 -0700 (PDT) +Received: by bkwj4 with SMTP id j4so3032bkw.26 + for ; Thu, 29 Mar 2012 14:57:51 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type:x-gm-message-state; + bh=ImMo1QS/r7/+19ZrUmSqvxkKaED3J5vdZ568MYwf1f0=; + b=mtoVsraBruarecd1tJmeGxHPwrLE+9P2xbP7ZGfA3TAtRvan/z+kz8x0GN1FT7IddD + Q+xqbKZdHYQ91+/1f80MdXBrFz25azC7KFtmwq7Db+N9Lh5Nv38uaE9FblBMFNE1Fi++ + OIlmvdojNteLvojJA/Jy8bmqTFnPP+3FG3Yl7MBpcMmFcyxUAv+JKToFqnxb2mafgvzG + 4r64Fj2HSaKKc7anX3qQNb9L4f+qo4r3W/+6h7Lt3tEbsjXlU2rHsoPxL4VD7GJcQw0E + sElK0xliRbaJsgjdODq7G2DSNEMdVvEJ/AQzrLd1q9n5wpK68zuSul4Xd1twpdXclioI + nc8g== +Received: by 10.204.154.28 with SMTP id m28mr14546419bkw.102.1333058271489; + Thu, 29 Mar 2012 14:57:51 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi. + [84.248.80.253]) by mx.google.com with ESMTPS id + jr13sm16493050bkb.14.2012.03.29.14.57.48 + (version=SSLv3 cipher=OTHER); Thu, 29 Mar 2012 14:57:50 -0700 (PDT) +From: Jani Nikula +To: Jameson Graef Rollins , + Mark Anderson , + Notmuch Mail +Subject: Re: Goto command for existing search windows +In-Reply-To: <87iphn40g7.fsf@servo.finestructure.net> +References: <3wd1uod7px7.fsf@testarossa.amd.com> + <3wdmx6z5rzx.fsf@testarossa.amd.com> + <87iphn40g7.fsf@servo.finestructure.net> +User-Agent: Notmuch/0.11.1+295~g780f284 (http://notmuchmail.org) Emacs/23.3.1 + (i686-pc-linux-gnu) +Date: Fri, 30 Mar 2012 00:57:44 +0300 +Message-ID: <87vcln9ijr.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQlqemXdKSaeidQMKA2GI6UGRN8e3lm76UafwqUpuy5+EyeYk/jQgqp5uSBjLPbaXcI9q9wu +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 29 Mar 2012 21:57:57 -0000 + +On Thu, 29 Mar 2012 13:27:36 -0700, Jameson Graef Rollins wrote: +> On Thu, Mar 29 2012, Mark Anderson wrote: +> > On Tue, 27 Mar 2012 14:24:36 -0600, Mark Anderson 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. -- 2.26.2