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 60A10431FBC for ; Thu, 19 Nov 2009 14:21:17 -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 ZGm8NCtpcajm for ; Thu, 19 Nov 2009 14:21:17 -0800 (PST) Received: from mail-fx0-f169.google.com (mail-fx0-f169.google.com [209.85.220.169]) by olra.theworths.org (Postfix) with ESMTP id DA708431FAE for ; Thu, 19 Nov 2009 14:21:16 -0800 (PST) Received: by fxm9 with SMTP id 9so851759fxm.10 for ; Thu, 19 Nov 2009 14:21:16 -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=0GXWWFjbqCA3I34YbAr3xJSMcZsKafDnRmZletBkGsE=; b=jc0Ar3oNUAvAIr62jtgQvHXzDh6XagVFJjlJL1pirNZsAiz+Pub41JpL7ld2bLSs9J v9yBKTXH1y+ddnfnweHLnlKexSYoMeuOHrqKc/ixGLKL0Pgm0u8fcV6LpHYN0CLD3hui lfg6si5qBBFfmMHHTgukxdceDeuV+MNOVUE7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=i2TB5cDfWNPKw9/8HvjbAWy5d4dYDdSfQFVycOCUFinEw1tH0/94b5bMK8/DtV69B2 IT6pIjoirLVMU2duhQ2KJurmOdq/IVtlKkwP4a8il/5THYJojsxTcAnDrWjnX7NF7DQ7 uYdUuOxFLQ7lDMIcz9OIPsglBtywUgbAkpNfU= Received: by 10.216.93.14 with SMTP id k14mr155546wef.152.1258669273138; Thu, 19 Nov 2009 14:21:13 -0800 (PST) Received: from fortitudo (nat08.metaweb.com [208.68.111.135]) by mx.google.com with ESMTPS id t2sm1605867gve.9.2009.11.19.14.21.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Nov 2009 14:21:12 -0800 (PST) Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 717e by fortitudo (DragonFly Mail Agent) Thu, 19 Nov 2009 14:21:10 -0800 From: Alexander Botero-Lowry To: notmuch@notmuchmail.org Date: Thu, 19 Nov 2009 14:20:56 -0800 Message-Id: <1258669256-13807-1-git-send-email-alex.boterolowry@gmail.com> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Buttonize citation expander. 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: Thu, 19 Nov 2009 22:21:17 -0000 Currently the button has no action or special handling at all. --- notmuch.el | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/notmuch.el b/notmuch.el index 1fc54c3..6a34282 100644 --- a/notmuch.el +++ b/notmuch.el @@ -453,10 +453,17 @@ which this thread was originally shown." (forward-line)) (let ((overlay (make-overlay beg-sub (point)))) (overlay-put overlay 'invisible 'notmuch-show-citation) - (overlay-put overlay 'before-string - (concat indent - "[" (number-to-string (count-lines beg-sub (point))) - "-line citation. Press 'c' to show.]\n"))))) + (let ( + (p (point)) + (cite-button-text (concat "[" (number-to-string (count-lines beg-sub (point))) + "-line citation. Press 'c' to show.]")) + ) + (goto-char (- beg-sub 1)) + (insert (concat "\n" indent)) + (insert-button cite-button-text) + (insert "\n") + (goto-char (+ (length cite-button-text) p)) + )))) (move-to-column depth) (if (looking-at notmuch-show-signature-regexp) (let ((sig-lines (- (count-lines beg-sub end) 1))) -- 1.6.5.2