Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / b8 / 503521e125e48e80be430b064fe2f0d17e44f0
1 Return-Path: <schnouki@schnouki.net>\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 CFB05429E21\r
6         for <notmuch@notmuchmail.org>; Mon,  3 Oct 2011 09:48:50 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.1\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
13         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id OEUc4UGK-ft7 for <notmuch@notmuchmail.org>;\r
18         Mon,  3 Oct 2011 09:48:50 -0700 (PDT)\r
19 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
20         by olra.theworths.org (Postfix) with ESMTP id C3FF5429E31\r
21         for <notmuch@notmuchmail.org>; Mon,  3 Oct 2011 09:48:45 -0700 (PDT)\r
22 Received: from localhost.localdomain (thor.loria.fr [152.81.12.250])\r
23         by ks3536.kimsufi.com (Postfix) with ESMTPSA id 04A216A06B8;\r
24         Mon,  3 Oct 2011 18:48:45 +0200 (CEST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
26         s=key-schnouki; t=1317660525;\r
27         bh=NWktp7w6Mzv00xxJfg3hj5/SEYp8AH6BAxhGmEoQWnw=;\r
28         h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\r
29         In-Reply-To:References;\r
30         b=HLwZUrJ+R+OtteepHIM9MszIv5lcLdTkFNo9Gj769xxWKcDoKMwesnhb5BKYvZk0B\r
31         q/9/FDXGzgDFOXJk+sZVqDw6hMBTGDaqDUZ8dJ6Zcggl7ksVomg8iEwNXuqhyRvWGr\r
32         6VGmOxcPkG2POxwOHSzdMILj6JBPpVSaj+JbAJa0=\r
33 From: Thomas Jost <schnouki@schnouki.net>\r
34 To: notmuch@notmuchmail.org\r
35 Subject: [PATCH 10/13] emacs: improve hidden signatures handling in\r
36         notmuch-show-advance-and-archive\r
37 Date: Mon,  3 Oct 2011 18:47:24 +0200\r
38 Message-Id: <1317660447-27520-11-git-send-email-schnouki@schnouki.net>\r
39 X-Mailer: git-send-email 1.7.6.4\r
40 In-Reply-To: <1317660447-27520-1-git-send-email-schnouki@schnouki.net>\r
41 References: <1317660447-27520-1-git-send-email-schnouki@schnouki.net>\r
42 In-Reply-To: <871uuuywtt.fsf@convex-new.cs.unb.ca>\r
43 References: <871uuuywtt.fsf@convex-new.cs.unb.ca>\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Mon, 03 Oct 2011 16:48:51 -0000\r
57 \r
58 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
59 \r
60 Use `previous-single-char-property-change' instead of going\r
61 through each character by hand and testing it's visibility.  This\r
62 fixes `notmuch-show-advance-and-archive' to work for the last\r
63 message in thread with hidden signature.\r
64 ---\r
65  emacs/notmuch-show.el |   17 +++++++++--------\r
66  1 files changed, 9 insertions(+), 8 deletions(-)\r
67 \r
68 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
69 index 90f9af7..bf267e8 100644\r
70 --- a/emacs/notmuch-show.el\r
71 +++ b/emacs/notmuch-show.el\r
72 @@ -1106,17 +1106,18 @@ thread, (remove the \"inbox\" tag from each message). Also kill\r
73  this buffer, and display the next thread from the search from\r
74  which this thread was originally shown."\r
75    (interactive)\r
76 -  (let ((end-of-this-message (notmuch-show-message-bottom)))\r
77 +  (let* ((end-of-this-message (notmuch-show-message-bottom))\r
78 +        (visible-end-of-this-message (1- end-of-this-message)))\r
79 +    (while (invisible-p visible-end-of-this-message)\r
80 +      (setq visible-end-of-this-message\r
81 +           (previous-single-char-property-change visible-end-of-this-message\r
82 +                                                 'invisible)))\r
83      (cond\r
84       ;; Ideally we would test `end-of-this-message' against the result\r
85       ;; of `window-end', but that doesn't account for the fact that\r
86 -     ;; the end of the message might be hidden, so we have to actually\r
87 -     ;; go to the end, walk back over invisible text and then see if\r
88 -     ;; point is visible.\r
89 -     ((save-excursion\r
90 -       (goto-char (- end-of-this-message 1))\r
91 -       (notmuch-show-move-past-invisible-backward)\r
92 -       (> (point) (window-end)))\r
93 +     ;; the end of the message might be hidden.\r
94 +     ((and visible-end-of-this-message\r
95 +          (> visible-end-of-this-message (window-end)))\r
96        ;; The bottom of this message is not visible - scroll.\r
97        (scroll-up nil))\r
98  \r
99 -- \r
100 1.7.6.4\r
101 \r