[PATCH] WIP: remove all non-prefixed-terms (and stemmed versions)
[notmuch-archives.git] / 00 / 47f8e3a241736c34dbc84222c442384b2e7b94
1 Return-Path: <dmitry.kurochkin@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id ECE29421192\r
6         for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 21:55:47 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id khfKDcoss+sj for <notmuch@notmuchmail.org>;\r
17         Thu, 30 Jun 2011 21:55:47 -0700 (PDT)\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 4B7CE42118E\r
22         for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 21:55:47 -0700 (PDT)\r
23 Received: by mail-bw0-f53.google.com with SMTP id 12so2682445bwg.26\r
24         for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 21:55:47 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=zrHA+ifthfgHP+Ej3ABOoqO+3pgC7SAtL5YSWWNUxmo=;\r
28         b=A+dL8kwcqm0XvqEgM73jnGTOTLE8T3Aq/ZbMr6HzWP2w5fEd0gv4I3A63ku9JkAK5n\r
29         1VrgIxhcZOrEVCNCVA1JRoI3GFjxEzinvBaRxChgVUgih3ZhjVFHZHyVXG/v+d+qlSwO\r
30         1RWDQDDd3K6BZqnLxadcD0N0qDZZi/XqZSYtw=\r
31 Received: by 10.204.144.194 with SMTP id a2mr2531882bkv.93.1309496146950;\r
32         Thu, 30 Jun 2011 21:55:46 -0700 (PDT)\r
33 Received: from localhost ([91.144.186.21])\r
34         by mx.google.com with ESMTPS id o3sm2651725bka.12.2011.06.30.21.55.45\r
35         (version=TLSv1/SSLv3 cipher=OTHER);\r
36         Thu, 30 Jun 2011 21:55:46 -0700 (PDT)\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH v2 5/7] emacs: improve hidden signatures handling in\r
40         notmuch-show-advance-and-archive\r
41 Date: Fri,  1 Jul 2011 08:55:20 +0400\r
42 Message-Id: <1309496122-4965-6-git-send-email-dmitry.kurochkin@gmail.com>\r
43 X-Mailer: git-send-email 1.7.5.4\r
44 In-Reply-To: <1309496122-4965-1-git-send-email-dmitry.kurochkin@gmail.com>\r
45 References: <1309376558-26284-1-git-send-email-dmitry.kurochkin@gmail.com>\r
46         <1309496122-4965-1-git-send-email-dmitry.kurochkin@gmail.com>\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Fri, 01 Jul 2011 04:55:48 -0000\r
60 \r
61 Use `previous-single-char-property-change' instead of going\r
62 through each character by hand and testing it's visibility.  This\r
63 fixes `notmuch-show-advance-and-archive' to work for the last\r
64 message in thread with hidden signature.\r
65 ---\r
66  emacs/notmuch-show.el |   17 +++++++++--------\r
67  1 files changed, 9 insertions(+), 8 deletions(-)\r
68 \r
69 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
70 index 6685717..ad3cc7b 100644\r
71 --- a/emacs/notmuch-show.el\r
72 +++ b/emacs/notmuch-show.el\r
73 @@ -1113,17 +1113,18 @@ thread, (remove the \"inbox\" tag from each message). Also kill\r
74  this buffer, and display the next thread from the search from\r
75  which this thread was originally shown."\r
76    (interactive)\r
77 -  (let ((end-of-this-message (notmuch-show-message-bottom)))\r
78 +  (let* ((end-of-this-message (notmuch-show-message-bottom))\r
79 +        (visible-end-of-this-message (1- end-of-this-message)))\r
80 +    (while (invisible-p visible-end-of-this-message)\r
81 +      (setq visible-end-of-this-message\r
82 +           (previous-single-char-property-change visible-end-of-this-message\r
83 +                                                 'invisible)))\r
84      (cond\r
85       ;; Ideally we would test `end-of-this-message' against the result\r
86       ;; of `window-end', but that doesn't account for the fact that\r
87 -     ;; the end of the message might be hidden, so we have to actually\r
88 -     ;; go to the end, walk back over invisible text and then see if\r
89 -     ;; point is visible.\r
90 -     ((save-excursion\r
91 -       (goto-char (- end-of-this-message 1))\r
92 -       (notmuch-show-move-past-invisible-backward)\r
93 -       (> (point) (window-end)))\r
94 +     ;; the end of the message might be hidden.\r
95 +     ((and visible-end-of-this-message\r
96 +          (> visible-end-of-this-message (window-end)))\r
97        ;; The bottom of this message is not visible - scroll.\r
98        (scroll-up nil))\r
99  \r
100 -- \r
101 1.7.5.4\r
102 \r