Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 93 / fae275d7102f50522ef5db00d814291bc9ffc7
1 Return-Path: <pablo.oliveira@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 21BA0431FBC\r
6         for <notmuch@notmuchmail.org>; Wed, 30 Dec 2009 04:25:57 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id jb39xcttZQme for <notmuch@notmuchmail.org>;\r
11         Wed, 30 Dec 2009 04:25:55 -0800 (PST)\r
12 Received: from mail-ew0-f215.google.com (mail-ew0-f215.google.com\r
13         [209.85.219.215])\r
14         by olra.theworths.org (Postfix) with ESMTP id E946A431FAE\r
15         for <notmuch@notmuchmail.org>; Wed, 30 Dec 2009 04:25:54 -0800 (PST)\r
16 Received: by ewy7 with SMTP id 7so5677590ewy.30\r
17         for <notmuch@notmuchmail.org>; Wed, 30 Dec 2009 04:25:54 -0800 (PST)\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
19         h=domainkey-signature:received:received:sender:from:to:subject:date\r
20         :message-id:mime-version:content-type;\r
21         bh=/Df6jF8NwiJ6j2AJsxrHnuAbePkG19p0qFzcv+b0Qs8=;\r
22         b=eUM1yEVX/0kmYC3s+/izvUg0cVk5wjIohveRyO2Ehr5q/3dm2QVaSlmgbPAwwZahd+\r
23         fZDj4E2BPgLWyuAVY22bMNf+3ZZfu2zfrv6HZYGr8oEYr3T9gTkA0qpxxJgelEwAOogd\r
24         Ks4aLixGzHkvxxy5wf1wScXfKarHn3jwEU4Xs=\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
26         h=sender:from:to:subject:date:message-id:mime-version:content-type;\r
27         b=gK9eDOCXgpavPOnM6y3rF0h5h5AoSpPV1yPxHMnpREcG2elma6/JA6mL+LDmpwbvw8\r
28         LEUfj7iAx2m0gwlYSprcj6VYK/l1uy+PvGH/3Yhu6WuehRLAz4uYkfjI+MMOlTmtsBUV\r
29         UlVOzEdyb9XgvcU6YxxWc5Zy0vdP+01SxVNDc=\r
30 Received: by 10.216.89.6 with SMTP id b6mr3019102wef.100.1262175953885;\r
31         Wed, 30 Dec 2009 04:25:53 -0800 (PST)\r
32 Received: from ecaz (pro75-1-81-57-59-142.fbx.proxad.net [81.57.59.142])\r
33         by mx.google.com with ESMTPS id 5sm34288727eyf.10.2009.12.30.04.25.51\r
34         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
35         Wed, 30 Dec 2009 04:25:52 -0800 (PST)\r
36 Sender: Pablo Oliveira <pablo.oliveira@gmail.com>\r
37 From: Pablo Oliveira <pablo@sifflez.org>\r
38 To: notmuch@notmuchmail.org\r
39 Date: Wed, 30 Dec 2009 13:25:40 +0100\r
40 Message-ID: <87bphgodh7.fsf@sifflez.org>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=us-ascii\r
43 Subject: [notmuch] [PATCH] Goto-Address mode hides the body toggle button on\r
44         messages of zero depth.\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.12\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Wed, 30 Dec 2009 12:25:57 -0000\r
58 \r
59 In this patch we increment depth by one for all messages, so that the \r
60 first character of the header is always a space. Without this patch, \r
61 the first character may be part of the sender email address, which is \r
62 buttonized by Goto-Address minor mode, therefore hiding the \r
63 notmuch-button-body-toggle-type button, and forcing us to do an \r
64 additional C-e to hit it.\r
65 \r
66 Signed-off-by: Pablo Oliveira <pablo@sifflez.org>\r
67 ---\r
68  notmuch.el |    6 +++++-\r
69  1 files changed, 5 insertions(+), 1 deletions(-)\r
70 \r
71 diff --git a/notmuch.el b/notmuch.el\r
72 index 97914f2..93f61c5 100644\r
73 --- a/notmuch.el\r
74 +++ b/notmuch.el\r
75 @@ -774,7 +774,11 @@ and each reply increases depth by 1)."\r
76    (if (re-search-forward notmuch-show-message-begin-regexp nil t)\r
77        (let ((message-begin (match-beginning 0)))\r
78         (re-search-forward notmuch-show-depth-match-regexp)\r
79 -       (let ((depth (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))\r
80 +       ;; We increment depth by one, so that the first character of the header\r
81 +       ;; is a space. Before this, the first character was part of the sender\r
82 +       ;; email address, which is buttonized by Goto-Address minor mode,\r
83 +       ;; therefore hiding the notmuch-button-body-toggle-type button.\r
84 +       (let ((depth (1+ (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))))\r
85               (match (string= "1" (buffer-substring (match-beginning 2) (match-end 2))))\r
86                (btn nil))\r
87           (setq btn (notmuch-show-markup-header message-begin depth))\r
88 -- \r
89 1.6.3.3\r
90 \r