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 0C08E429E39 for ; Wed, 25 May 2011 15:10:12 -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 ikmgtYs9RBL1 for ; Wed, 25 May 2011 15:10:11 -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 00A82429E30 for ; Wed, 25 May 2011 15:10:09 -0700 (PDT) Received: by mail-fx0-f53.google.com with SMTP id 8so217139fxm.26 for ; Wed, 25 May 2011 15:10:09 -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=FqhzAKogFFU6ftr6lupG4T8taoHtP2CSiIUsDgmRmis=; b=JLwlVhggmS69yNE5AftHj9X5qtFtFp9vvVtvtSgiE4tBQLF3ueCMvTu6DGgdla+Qn2 O2Fj0njRATmjAc1YNUzTJVAsYiEK2ZGL6HcpFetnZ6LUidkK4WmsUUFmaV6W+mRpcIZi pCoYHckHY/IBxGdH2Ka9cfw/jNM63lvS3iyRg= 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=BUmzjpNq0mUMJEwpsCMed2z9DEFwhPZP1L3vDmviJ2v3tzWYZU29sBnoegk4/ysJSm xhChYxWDHSRjnLsKxfV7CKmf9i3Y/Ce9VPsm1t6swOBsPuYYR0u03M7fzPV2IunsNzfr 9MBA9GO1KtE1+jUxLkXhDAACU/0PHfOUm5bic= Received: by 10.223.127.210 with SMTP id h18mr110563fas.77.1306361409665; Wed, 25 May 2011 15:10:09 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id r10sm31643fah.26.2011.05.25.15.10.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2011 15:10:09 -0700 (PDT) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH 1/5] Pass message to the `notmuch-show-insert-text/plain-hook' hook. Date: Thu, 26 May 2011 02:10:12 +0400 Message-Id: <1306361416-5019-2-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:12 -0000 Before the change, the `notmuch-show-insert-text/plain-hook' was given only the `depth' argument. The patch adds another one - the message. Currently, the new message argument is not used by any on the hooks. But it will be used later to get access to message invisibility specs when wash buttons are inserted. --- emacs/notmuch-show.el | 2 +- emacs/notmuch-wash.el | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index bd348e1..786debf 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -531,7 +531,7 @@ current buffer, if possible." (save-excursion (save-restriction (narrow-to-region start (point-max)) - (run-hook-with-args 'notmuch-show-insert-text/plain-hook depth)))) + (run-hook-with-args 'notmuch-show-insert-text/plain-hook msg depth)))) t) (defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth depth declared-type) diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index 115c3bb..7d87e85 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -147,7 +147,7 @@ insert before the button, probably for indentation." 'overlay overlay :type button-type)))) -(defun notmuch-wash-excerpt-citations (depth) +(defun notmuch-wash-excerpt-citations (msg depth) "Excerpt citations and up to one signature." (goto-char (point-min)) (beginning-of-line) @@ -185,7 +185,7 @@ insert before the button, probably for indentation." ;; -(defun notmuch-wash-elide-blank-lines (depth) +(defun notmuch-wash-elide-blank-lines (msg depth) "Elide leading, trailing and successive blank lines." ;; Algorithm derived from `article-strip-multiple-blank-lines' in @@ -213,7 +213,7 @@ insert before the button, probably for indentation." ;; -(defun notmuch-wash-tidy-citations (depth) +(defun notmuch-wash-tidy-citations (msg depth) "Improve the display of cited regions of a message. Perform several transformations on the message body: @@ -244,7 +244,7 @@ Perform several transformations on the message body: ;; -(defun notmuch-wash-wrap-long-lines (depth) +(defun notmuch-wash-wrap-long-lines (msg depth) "Wrap any long lines in the message to the width of the window. When doing so, maintaining citation leaders in the wrapped text." @@ -263,7 +263,7 @@ When doing so, maintaining citation leaders in the wrapped text." (defvar diff-file-header-re) ; From `diff-mode.el'. -(defun notmuch-wash-convert-inline-patch-to-part (depth) +(defun notmuch-wash-convert-inline-patch-to-part (msg depth) "Convert an inline patch into a fake 'text/x-diff' attachment. Given that this function guesses whether a buffer includes a -- 1.7.5.1