Re: Goto command for existing search windows
authorJameson Graef Rollins <jrollins@finestructure.net>
Thu, 29 Mar 2012 20:27:36 +0000 (13:27 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:52 +0000 (09:45 -0800)
66/c7ec27c285df6376283d6913839c221799cdf6 [new file with mode: 0644]

diff --git a/66/c7ec27c285df6376283d6913839c221799cdf6 b/66/c7ec27c285df6376283d6913839c221799cdf6
new file mode 100644 (file)
index 0000000..393ec6b
--- /dev/null
@@ -0,0 +1,109 @@
+Return-Path: <jrollins@finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8FD4A431FB6\r
+       for <notmuch@notmuchmail.org>; Thu, 29 Mar 2012 13:27:42 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.29\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id YdOpFz8LXqvt for <notmuch@notmuchmail.org>;\r
+       Thu, 29 Mar 2012 13:27:40 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id 358B2431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 29 Mar 2012 13:27:40 -0700 (PDT)\r
+Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by fire-doxen-postvirus (Postfix) with ESMTP id DB22F328064;\r
+       Thu, 29 Mar 2012 13:27:39 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
+Received: from finestructure.net (DHCP-123-229.caltech.edu [131.215.123.229])\r
+       (Authenticated sender: jrollins)\r
+       by fire-doxen-submit (Postfix) with ESMTP id 20FE32E50CC1;\r
+       Thu, 29 Mar 2012 13:27:37 -0700 (PDT)\r
+Received: by finestructure.net (Postfix, from userid 1000)\r
+       id EC5F8139; Thu, 29 Mar 2012 13:27:36 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Mark Anderson <MarkR.Anderson@amd.com>,\r
+       Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: Goto command for existing search windows\r
+In-Reply-To: <3wdmx6z5rzx.fsf@testarossa.amd.com>\r
+References: <3wd1uod7px7.fsf@testarossa.amd.com>\r
+       <3wdmx6z5rzx.fsf@testarossa.amd.com>\r
+User-Agent: Notmuch/0.12+78~g127fa56 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 29 Mar 2012 13:27:36 -0700\r
+Message-ID: <87iphn40g7.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha256; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 29 Mar 2012 20:27:42 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Thu, Mar 29 2012, Mark Anderson <MarkR.Anderson@amd.com> wrote:\r
+> On Tue, 27 Mar 2012 14:24:36 -0600, Mark Anderson <MarkR.Anderson@amd.com=\r
+> wrote:\r
+>> I was looking for a function which would find a buffer based on one of\r
+>> my saved searches, and perform the search if it didn't exist.\r
+>>=20\r
+>> I've gotten it a bit closer, if I perform the search that matches a\r
+>> saved search, then this routine will find it because of the magic in\r
+>> notmuch-search-buffer-title, but perhaps someone else feels up to\r
+>> searching through the saved searches directly?\r
+\r
+Hey, Mark.  I think you can be a little simpler.  The title for search\r
+buffers is based on the search, so a buffer will always be reused for an\r
+identical search.  You don't need to do any fancy buffer searching.  For\r
+instance, the following works perfectly for me, and I believe produces\r
+the same results as your technique:\r
+\r
+(defun jnotmuch-inbox ()\r
+  "Search: inbox"\r
+  (interactive)\r
+  (notmuch-search "tag:inbox" t))\r
+(define-key notmuch-hello-mode-map "2" 'jnotmuch-inbox)\r
+(define-key notmuch-search-mode-map "2" 'jnotmuch-inbox)\r
+(define-key notmuch-show-mode-map "2" 'jnotmuch-inbox)\r
+\r
+jamie.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+\r
+iQIcBAEBCAAGBQJPdMW4AAoJEO00zqvie6q8ZYYP+gJfYFM8ndCeQkKYebrTwoA8\r
+Q7KkQ2a4f7FF6/6/iyOclGACzzEHEudciykqbT4ig3J1k221r2lCMUgTJpY4PFIi\r
+b4c24LhBSlO0gx4V+T2assWN3QqILk3CSfOefvLzMZr5Rmiuw/4i0knnHeG/a1fA\r
+ZJmbec2VY2nOwcP4388DMi+ktr9Ms7VnJsJ4Sr5JrwEGukDzv1AMNaAX9aqEY+ES\r
+sFvQ7N6K48dnaV6P0rzRyfmW9/Vt96KkmkKkLmm45656/y9lkECpWCrKu0uT9I7t\r
+KmJdGwV5f2b3KgPBpexCkjEEeh4ss7/ygwY+qQACQucHnL3/VhBVEZ3ISljQSSrx\r
+QxY6qCceLUKBdw+1s+8udjJxTPpsRT4nJnE3gWsgkNH1mv/skJYqQqVn6ir5LeTa\r
+8uBcFHt8adIFinvRqmHUxJcnLLFdXKuBb9QFIq78IMHmu+kmZhxN21G0+TOT++TI\r
+JJTEd2cmsZC7AtWyufM1WQGZTTozz+c6aQ5rgYL45bZx5zgGnqddEKulvIyooOCy\r
+k6Gc1YUeAF/NMACkT4BHEN72YD1VoM36bGlM9lIe236gcehMQmeNIuZev4U2lFoo\r
+PCGB2D3fpJm6DLStflztxOROLYPcYWur5c9VPJfH6w9pBCIrCjcgv9qaMJleqTiW\r
+UIocEOOrPdDeDhmdISP3\r
+=LwmH\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r