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 A0529429E44 for ; Wed, 25 May 2011 15:10:17 -0700 (PDT) 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 TIrE6bjNebvQ for ; Wed, 25 May 2011 15:10:16 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C2C60429E3E for ; Wed, 25 May 2011 15:10:13 -0700 (PDT) Received: by mail-fx0-f53.google.com with SMTP id 8so217139fxm.26 for ; Wed, 25 May 2011 15:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=kVtWvPNv7PCYxGpsW4z4gcFJpz8dGK0w5i4tHNcs9nE=; b=idTyhXMThE36UZAQMmQewc8FdSLpfAxEwbgnAIMjI7USYhDRwiPEF7v7GzGbuVQw9a 5eivXAlQmlUJz6hvHQMPZ/sjR5eoUGfMWS2Si0HFwxRZ4qifO/3e7PgQjpVyYQZrYnYQ h/2Ozk7mc4xJtCFKgtyTnHxjxyExBSb3UqImY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=iiv30eUWjtdgtaijUGH8tZN6lxBxl7OF9Ncmmki0pdsPVs6629ao7sqiJHKLXNV1Rt neNsjFHnvR2oYeL3vrScxBsA9Z7Rn6TXQivBf6i9ksOKGWnZTDoUoM9gdAl1557EuOO0 C8KRsJ1GRjoB0uv+AYghCclsp/So2FOeXpkjQ= Received: by 10.223.59.146 with SMTP id l18mr121018fah.58.1306361413474; Wed, 25 May 2011 15:10:13 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id m26sm31645fab.34.2011.05.25.15.10.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2011 15:10:12 -0700 (PDT) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH 2/5] Set message invisibility spec properties before inserting the body. Date: Thu, 26 May 2011 02:10:13 +0400 Message-Id: <1306361416-5019-3-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com> 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: Wed, 25 May 2011 22:10:18 -0000 This would allow body-inserting code (in particular, wash button-inserting code) to use message invisibility specs. --- emacs/notmuch-show.el | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 786debf..34c0b79 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -693,6 +693,9 @@ current buffer, if possible." (setq content-start (point-marker)) + (plist-put msg :headers-invis-spec headers-invis-spec) + (plist-put msg :message-invis-spec message-invis-spec) + ;; Set `headers-start' to point after the 'Subject:' header to be ;; compatible with the existing implementation. This just sets it ;; to after the first header. @@ -730,10 +733,7 @@ current buffer, if possible." ;; message. (put-text-property message-start message-end :notmuch-message-extent (cons message-start message-end)) - (plist-put msg :headers-invis-spec headers-invis-spec) (overlay-put (make-overlay headers-start headers-end) 'invisible headers-invis-spec) - - (plist-put msg :message-invis-spec message-invis-spec) (overlay-put (make-overlay body-start body-end) 'invisible message-invis-spec) ;; Save the properties for this message. Currently this saves the -- 1.7.5.1