From fa311076607acb0042a0e82147e7e274d13887ec Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 1 Jul 2013 21:05:43 +0100 Subject: [PATCH] [PATCH 4/4] contrib: pick: document several of the tree/forest insertion functions. --- 9d/e28d321d8fefd3d0ec68b34d6bb3ccafdffe78 | 114 ++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 9d/e28d321d8fefd3d0ec68b34d6bb3ccafdffe78 diff --git a/9d/e28d321d8fefd3d0ec68b34d6bb3ccafdffe78 b/9d/e28d321d8fefd3d0ec68b34d6bb3ccafdffe78 new file mode 100644 index 000000000..3b6256c7d --- /dev/null +++ b/9d/e28d321d8fefd3d0ec68b34d6bb3ccafdffe78 @@ -0,0 +1,114 @@ +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 1ABA9431FCF + for ; Mon, 1 Jul 2013 13:06:10 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=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 ISlZT43H4-Ib for ; + Mon, 1 Jul 2013 13:06:04 -0700 (PDT) +Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com + [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id B9947431FD2 + for ; Mon, 1 Jul 2013 13:05:57 -0700 (PDT) +Received: by mail-wi0-f172.google.com with SMTP id c10so3472260wiw.5 + for ; Mon, 01 Jul 2013 13:05:56 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; + bh=v/Y827LYLmu2WP5xLN6utW4P07nt0tO2KlAizBfFT40=; + b=YoSWNJfzlMYaKaKdlVJ2M6zzPdGyPsVQMBWmVcp77lzmodh1oV2BnElyBTVWDswG/A + mVxUlKB6vn1p0traEHFjqkxgoIrByK4+yMYLGGbb8skxyYv5V3zzpVZgg4Sgb0uWrNEU + oMHhU35QvAUag0bRF1/UwUL4q5vJ7+UqMZ9cLsoatLbAtPScrjVkoMQlY827EbA9zSa1 + ACe3QPuqGpqcjfn+pKvaiXt2VyFNQDRNeJNz2yycBhNtUd1KbIE1uGd5xuqAKb5Pb3t4 + LM8TyK9BJ0Ftn2HaE2TVSirYHTTksKHTpq5P4Qvrqk9bAeNR5vQkqdjo7v+xm0/itoGC + IChg== +X-Received: by 10.180.108.115 with SMTP id hj19mr5377850wib.4.1372709156685; + Mon, 01 Jul 2013 13:05:56 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id + fd3sm18512618wic.10.2013.07.01.13.05.55 for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Mon, 01 Jul 2013 13:05:56 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 4/4] contrib: pick: document several of the tree/forest + insertion functions. +Date: Mon, 1 Jul 2013 21:05:43 +0100 +Message-Id: <1372709143-12319-5-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1372709143-12319-1-git-send-email-markwalters1009@gmail.com> +References: <1372709143-12319-1-git-send-email-markwalters1009@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: Mon, 01 Jul 2013 20:06:10 -0000 + +--- + contrib/notmuch-pick/notmuch-pick.el | 12 ++++++++++-- + 1 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el +index fd68fc6..fbd7c0b 100644 +--- a/contrib/notmuch-pick/notmuch-pick.el ++++ b/contrib/notmuch-pick/notmuch-pick.el +@@ -683,7 +683,10 @@ unchanged ADDRESS if parsing fails." + (notmuch-pick-show-message))))) + + (defun notmuch-pick-insert-tree (tree depth tree-status first last) +- "Insert the message tree TREE at depth DEPTH in the current thread." ++ "Insert the message tree TREE at depth DEPTH in the current thread. ++ ++A message tree is another name for a single sub-thread: i.e., a ++message together with all its descendents." + (let ((msg (car tree)) + (replies (cadr tree))) + +@@ -714,7 +717,7 @@ unchanged ADDRESS if parsing fails." + (notmuch-pick-insert-thread replies (1+ depth) tree-status))) + + (defun notmuch-pick-insert-thread (thread depth tree-status) +- "Insert the thread THREAD at depth DEPTH >= 1 in the current forest." ++ "Insert the collection of sibling sub-threads THREAD at depth DEPTH in the current forest." + (let ((n (length thread))) + (loop for tree in thread + for count from 1 to n +@@ -722,12 +725,17 @@ unchanged ADDRESS if parsing fails." + do (notmuch-pick-insert-tree tree depth tree-status (eq count 1) (eq count n))))) + + (defun notmuch-pick-insert-forest-thread (forest-thread) ++ "Insert a single complete thread." + (let (tree-status) + ;; Reset at the start of each main thread. + (setq notmuch-pick-previous-subject nil) + (notmuch-pick-insert-thread forest-thread 0 tree-status))) + + (defun notmuch-pick-insert-forest (forest) ++ "Insert a forest of threads. ++ ++This function inserts a collection of several complete threads as ++passed to it by notmuch-pick-process-filter." + (mapc 'notmuch-pick-insert-forest-thread forest)) + + (defun notmuch-pick-mode () +-- +1.7.9.1 + -- 2.26.2