--- /dev/null
+Return-Path: <alex.boterolowry@gmail.com>\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 C9BA5431FBC\r
+ for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 01:13:30 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 cNq2qSC24vEJ for <notmuch@notmuchmail.org>;\r
+ Wed, 25 Nov 2009 01:13:30 -0800 (PST)\r
+Received: from mail-pz0-f197.google.com (mail-pz0-f197.google.com\r
+ [209.85.222.197])\r
+ by olra.theworths.org (Postfix) with ESMTP id 63482431FAE\r
+ for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 01:13:30 -0800 (PST)\r
+Received: by pzk35 with SMTP id 35so5509871pzk.22\r
+ for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 01:13:29 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+ h=domainkey-signature:received:received:received:from:to:cc:subject\r
+ :date:message-id:x-mailer;\r
+ bh=yZemcT8bYLJUUcAjNWGBRdXgldYyL6r+qcUSx8BkJe0=;\r
+ b=E+WYkutOPqzJS5SQu3Ttr7qyHaFcqHemTkprY9VtX72vT63ITKQ1HAMxX6+58So8dF\r
+ gttZox8gIWK3rbqkxcZYcKtZ72kAYtgHnjJBS3o5TjPq9PIvYI1dh5kGvYi8Wt+KQ8o5\r
+ EO/z/upvODJDV67w/NT022ZvuRzaVdX4DnU28=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+ h=from:to:cc:subject:date:message-id:x-mailer;\r
+ b=A6KJSB+piXc8MpFnKTN+uyrEtYcYbumIBmmIxbZAKFbQquP9KHqLURx+j0EaAsgi6t\r
+ Ij2POwcubQACFCD+hEf0bT4DUqoA7SDhqAiFAzmW8QjZgKURYEJrKMotKP2HpGm4ibgO\r
+ 3Bc5a/b3CpiA6eAfw1Am9sMwfuNY96DUeOqhA=\r
+Received: by 10.115.39.11 with SMTP id r11mr14926929waj.152.1259140409700;\r
+ Wed, 25 Nov 2009 01:13:29 -0800 (PST)\r
+Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85])\r
+ by mx.google.com with ESMTPS id 21sm3823901pxi.4.2009.11.25.01.13.28\r
+ (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+ Wed, 25 Nov 2009 01:13:29 -0800 (PST)\r
+Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 710b\r
+ by fortitudo (DragonFly Mail Agent) Wed, 25 Nov 2009 01:13:34 -0800\r
+From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Date: Wed, 25 Nov 2009 01:13:32 -0800\r
+Message-Id: <1259140413-16278-1-git-send-email-alex.boterolowry@gmail.com>\r
+X-Mailer: git-send-email 1.6.5.2\r
+Subject: [notmuch] [PATCH 1/2] add functions to toggle the nearest backwards\r
+ button of a given type\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\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: Wed, 25 Nov 2009 09:13:31 -0000\r
+\r
+It was noted that though local expansion was nice, it was also pretty\r
+nice to have an easy way to just open the headers without moving to the\r
+header button. So this exposes a number of symbols which search backwards\r
+in the buffer for the nearest button of the desire type and push it\r
+---\r
+ notmuch.el | 33 +++++++++++++++++++++++++++++++++\r
+ 1 files changed, 33 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index 551048a..1853762 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -771,6 +771,39 @@ thread from that buffer can be show when done with this one)."\r
+ ))))\r
+ )))\r
+ \r
++(defun notmuch-toggle-hidden-section (section-button-type) \r
++ (save-excursion\r
++ (let ((btn (forward-button -1)))\r
++ (while btn\r
++ (if (button-has-type-p btn section-button-type)\r
++ (progn (push-button)\r
++ (setq btn nil))\r
++ (condition-case err\r
++ (setq btn (forward-button -1))\r
++ (error (setq btn nil))))))\r
++ )\r
++)\r
++\r
++(defun notmuch-toggle-hidden-headers ()\r
++ (interactive)\r
++ (notmuch-toggle-hidden-section 'notmuch-button-headers-toggle-type)\r
++)\r
++\r
++(defun notmuch-toggle-hidden-body ()\r
++ (interactive)\r
++ (notmuch-toggle-hidden-section 'notmuch-button-body-toggle-type)\r
++)\r
++\r
++(defun notmuch-toggle-hidden-citation ()\r
++ (interactive)\r
++ (notmuch-toggle-hidden-section 'notmuch-button-citation-toggle-type)\r
++)\r
++\r
++(defun notmuch-toggle-hidden-signature ()\r
++ (interactive)\r
++ (notmuch-toggle-hidden-section 'notmuch-button-signature-toggle-type)\r
++)\r
++\r
+ (defvar notmuch-search-authors-width 40\r
+ "Number of columns to use to display authors in a notmuch-search buffer.")\r
+ \r
+-- \r
+1.6.5.2\r
+\r