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