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 6E123431FD0 for ; Thu, 22 Dec 2011 06:25:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 HLyoxO5ISb4f for ; Thu, 22 Dec 2011 06:25:11 -0800 (PST) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 1AB3F431FB6 for ; Thu, 22 Dec 2011 06:25:11 -0800 (PST) Received: by qcha6 with SMTP id a6so6305249qch.26 for ; Thu, 22 Dec 2011 06:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=D1uxEqtwbhBuPz6dNDg441PPP7MPFMtWElmZzo6PkIA=; b=nRBR8VJ/0B7VLUNz8+sA+SuZhzjcetfd39DpDu6FlQzHmz9vHyx8SKZDYwvfB1GQ4q wM0XPVYG+an5vRbbakJKbG2Z0XgHb8/HK2Th4jCO1XTym8md/0GO1ZjW8smVocPv6FY/ JXnE7j2Gu+hktuW5tyUU6UBmyR/owbbf5UuXU= Received: by 10.224.18.66 with SMTP id v2mr13931723qaa.91.1324563909172; Thu, 22 Dec 2011 06:25:09 -0800 (PST) Received: from localhost.localdomain (24-158-179-191.dhcp.jcsn.tn.charter.com. [24.158.179.191]) by mx.google.com with ESMTPS id ev4sm15250922qab.9.2011.12.22.06.25.02 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Dec 2011 06:25:02 -0800 (PST) From: Aaron Ecay To: notmuch@notmuchmail.org Subject: [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Date: Thu, 22 Dec 2011 09:24:20 -0500 Message-Id: <1324563860-21986-1-git-send-email-aaronecay@gmail.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: References: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Thu, 22 Dec 2011 14:25:13 -0000 Text properties change between characters; prev-s-c-property-change returns the position after the change. Thus, it is still inside the invisible region. --- emacs/notmuch-show.el | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index f52f233..905c9ec 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1169,8 +1169,9 @@ current window), advance to the next open message." (ret nil)) (while (invisible-p visible-end-of-this-message) (setq visible-end-of-this-message - (previous-single-char-property-change visible-end-of-this-message - 'invisible))) + (max (point-min) + (1- (previous-single-char-property-change + visible-end-of-this-message 'invisible))))) (cond ;; Ideally we would test `end-of-this-message' against the result ;; of `window-end', but that doesn't account for the fact that -- 1.7.8