[notmuch] [PATCH] Goto-Address mode hides the body toggle button on messages of zero...
authorPablo Oliveira <pablo@sifflez.org>
Wed, 30 Dec 2009 12:25:40 +0000 (13:25 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:56 +0000 (09:35 -0800)
93/fae275d7102f50522ef5db00d814291bc9ffc7 [new file with mode: 0644]

diff --git a/93/fae275d7102f50522ef5db00d814291bc9ffc7 b/93/fae275d7102f50522ef5db00d814291bc9ffc7
new file mode 100644 (file)
index 0000000..0c957fc
--- /dev/null
@@ -0,0 +1,90 @@
+Return-Path: <pablo.oliveira@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 21BA0431FBC\r
+       for <notmuch@notmuchmail.org>; Wed, 30 Dec 2009 04:25:57 -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 jb39xcttZQme for <notmuch@notmuchmail.org>;\r
+       Wed, 30 Dec 2009 04:25:55 -0800 (PST)\r
+Received: from mail-ew0-f215.google.com (mail-ew0-f215.google.com\r
+       [209.85.219.215])\r
+       by olra.theworths.org (Postfix) with ESMTP id E946A431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 30 Dec 2009 04:25:54 -0800 (PST)\r
+Received: by ewy7 with SMTP id 7so5677590ewy.30\r
+       for <notmuch@notmuchmail.org>; Wed, 30 Dec 2009 04:25:54 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:received:received:sender:from:to:subject:date\r
+       :message-id:mime-version:content-type;\r
+       bh=/Df6jF8NwiJ6j2AJsxrHnuAbePkG19p0qFzcv+b0Qs8=;\r
+       b=eUM1yEVX/0kmYC3s+/izvUg0cVk5wjIohveRyO2Ehr5q/3dm2QVaSlmgbPAwwZahd+\r
+       fZDj4E2BPgLWyuAVY22bMNf+3ZZfu2zfrv6HZYGr8oEYr3T9gTkA0qpxxJgelEwAOogd\r
+       Ks4aLixGzHkvxxy5wf1wScXfKarHn3jwEU4Xs=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=sender:from:to:subject:date:message-id:mime-version:content-type;\r
+       b=gK9eDOCXgpavPOnM6y3rF0h5h5AoSpPV1yPxHMnpREcG2elma6/JA6mL+LDmpwbvw8\r
+       LEUfj7iAx2m0gwlYSprcj6VYK/l1uy+PvGH/3Yhu6WuehRLAz4uYkfjI+MMOlTmtsBUV\r
+       UlVOzEdyb9XgvcU6YxxWc5Zy0vdP+01SxVNDc=\r
+Received: by 10.216.89.6 with SMTP id b6mr3019102wef.100.1262175953885;\r
+       Wed, 30 Dec 2009 04:25:53 -0800 (PST)\r
+Received: from ecaz (pro75-1-81-57-59-142.fbx.proxad.net [81.57.59.142])\r
+       by mx.google.com with ESMTPS id 5sm34288727eyf.10.2009.12.30.04.25.51\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Wed, 30 Dec 2009 04:25:52 -0800 (PST)\r
+Sender: Pablo Oliveira <pablo.oliveira@gmail.com>\r
+From: Pablo Oliveira <pablo@sifflez.org>\r
+To: notmuch@notmuchmail.org\r
+Date: Wed, 30 Dec 2009 13:25:40 +0100\r
+Message-ID: <87bphgodh7.fsf@sifflez.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Subject: [notmuch] [PATCH] Goto-Address mode hides the body toggle button on\r
+       messages of zero depth.\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, 30 Dec 2009 12:25:57 -0000\r
+\r
+In this patch we increment depth by one for all messages, so that the \r
+first character of the header is always a space. Without this patch, \r
+the first character may be part of the sender email address, which is \r
+buttonized by Goto-Address minor mode, therefore hiding the \r
+notmuch-button-body-toggle-type button, and forcing us to do an \r
+additional C-e to hit it.\r
+\r
+Signed-off-by: Pablo Oliveira <pablo@sifflez.org>\r
+---\r
+ notmuch.el |    6 +++++-\r
+ 1 files changed, 5 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index 97914f2..93f61c5 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -774,7 +774,11 @@ and each reply increases depth by 1)."\r
+   (if (re-search-forward notmuch-show-message-begin-regexp nil t)\r
+       (let ((message-begin (match-beginning 0)))\r
+       (re-search-forward notmuch-show-depth-match-regexp)\r
+-      (let ((depth (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))\r
++      ;; We increment depth by one, so that the first character of the header\r
++      ;; is a space. Before this, the first character was part of the sender\r
++      ;; email address, which is buttonized by Goto-Address minor mode,\r
++      ;; therefore hiding the notmuch-button-body-toggle-type button.\r
++      (let ((depth (1+ (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))))\r
+             (match (string= "1" (buffer-substring (match-beginning 2) (match-end 2))))\r
+               (btn nil))\r
+         (setq btn (notmuch-show-markup-header message-begin depth))\r
+-- \r
+1.6.3.3\r
+\r