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 5AAA1431FBC for ; Mon, 23 Nov 2009 23:45:12 -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 oaYCoMvMA7sZ for ; Mon, 23 Nov 2009 23:45:11 -0800 (PST) Received: from mail-pz0-f171.google.com (mail-pz0-f171.google.com [209.85.222.171]) by olra.theworths.org (Postfix) with ESMTP id A3DC3431FAE for ; Mon, 23 Nov 2009 23:45:11 -0800 (PST) Received: by pzk1 with SMTP id 1so4588626pzk.33 for ; Mon, 23 Nov 2009 23:45:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer; bh=8NWBNZ26LEs9F3fBTGqCUsNx0B6yB4MyefRY1TaixKg=; b=xAqxJz7NwEPS6DcEOt9ZNDFQDwIytvat4Tm1Qn1SGofpjJGsbNWWwNB314D4wbLqg+ BCNlG5vExvHqS4Ca735IoBRgA9bLoqwg7An8/d6N5b+58Mcmy5q0q2qKnI/KgI/IH2rf +/1C7KdwqNNDRwKH3tTkOeRF+nnYrjQ+6LAQY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=eb+vUH2K/ztV9kz+55KipTjS3vcqEleLa75a/h8kaHAdg7HXtBNy+jRtoPjOrfSbkv iG375oCsR8NqG62rA/vY9V/EJP+lxQMuqBwqFd/O8h54Fk+TpWoP1tq0hkzHSz/7Qt+W Uf0e5IRzlB+jLHoNzRc8WDZ2JENjSHSKNirbQ= Received: by 10.114.187.8 with SMTP id k8mr11321181waf.220.1259048709201; Mon, 23 Nov 2009 23:45:09 -0800 (PST) Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85]) by mx.google.com with ESMTPS id 22sm3089049pxi.2.2009.11.23.23.45.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 23:45:08 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 7053 by fortitudo (DragonFly Mail Agent) Mon, 23 Nov 2009 23:45:13 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Mon, 23 Nov 2009 23:45:03 -0800 Message-Id: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH 1/5] make headers locally expandable/collapsable 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: Tue, 24 Nov 2009 07:45:13 -0000 --- notmuch.el | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/notmuch.el b/notmuch.el index fa6e7de..8aee286 100644 --- a/notmuch.el +++ b/notmuch.el @@ -605,7 +605,8 @@ which this thread was originally shown." (end-of-line) ; Inverse video for subject (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t)) - (forward-line 2) + (forward-line 1) + (end-of-line) (let ((beg-hidden (point-marker))) (re-search-forward notmuch-show-header-end-regexp) (beginning-of-line) @@ -619,8 +620,19 @@ which this thread was originally shown." (forward-line) ) (indent-rigidly beg end depth) - (overlay-put (make-overlay beg-hidden end) - 'invisible 'notmuch-show-header) + (let ((invis-spec (make-symbol "notmuch-show-header"))) + (add-to-invisibility-spec (cons invis-spec t)) + (overlay-put (make-overlay beg-hidden end) + 'invisible invis-spec) + (goto-char beg) + (forward-line) + (let ((header-button (make-button (line-beginning-position) (line-end-position)))) + (button-put header-button 'invisibility-spec (cons invis-spec t)) + (button-put header-button 'action 'notmuch-toggle-invisible-action) + (button-put header-button 'follow-link t) + (button-put header-button 'help-echo + "mouse-1, RET: Show headers") + )) (goto-char end) (insert "\n") (set-marker beg nil) -- 1.6.5.2