1 Return-Path: <dme@dme.org>
\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 A8F96431FAE
\r
6 for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 23:19:48 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id P0qCTOVcaPmT for <notmuch@notmuchmail.org>;
\r
16 Wed, 25 Jan 2012 23:19:48 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 50E64431FB6 for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 23:19:47 -0800
\r
22 Received: by wgbdt12 with SMTP id dt12so226448wgb.2
\r
23 for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 23:19:45 -0800 (PST)
\r
24 Received: by 10.180.95.1 with SMTP id dg1mr1365190wib.21.1327562385142;
\r
25 Wed, 25 Jan 2012 23:19:45 -0800 (PST)
\r
26 Received: from hotblack-desiato.hh.sledj.net
\r
27 (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])
\r
28 by mx.google.com with ESMTPS id fv6sm9579699wib.8.2012.01.25.23.19.42
\r
29 (version=TLSv1/SSLv3 cipher=OTHER);
\r
30 Wed, 25 Jan 2012 23:19:43 -0800 (PST)
\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)
\r
32 id 83AF49FE6A; Thu, 26 Jan 2012 07:19:41 +0000 (GMT)
\r
33 From: David Edmondson <dme@dme.org>
\r
34 To: notmuch@notmuchmail.org
\r
35 Subject: [PATCH 1/4 v3] test: `visible-buffer-substring' should not return
\r
37 Date: Thu, 26 Jan 2012 07:19:37 +0000
\r
38 Message-Id: <1327562380-12894-2-git-send-email-dme@dme.org>
\r
39 X-Mailer: git-send-email 1.7.8.3
\r
40 In-Reply-To: <1327562380-12894-1-git-send-email-dme@dme.org>
\r
41 References: <1327503908-17226-1-git-send-email-dme@dme.org>
\r
42 <1327562380-12894-1-git-send-email-dme@dme.org>
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Thu, 26 Jan 2012 07:19:49 -0000
\r
57 When using `visible-buffer-substring' to examine a buffer, the text
\r
58 properties are not useful, so don't include them.
\r
60 test/test-lib.el | 9 ++++++---
\r
61 1 files changed, 6 insertions(+), 3 deletions(-)
\r
63 diff --git a/test/test-lib.el b/test/test-lib.el
\r
64 index bc75f06..5b32e0a 100644
\r
65 --- a/test/test-lib.el
\r
66 +++ b/test/test-lib.el
\r
67 @@ -51,16 +51,19 @@ FILENAME is OUTPUT."
\r
68 (with-temp-file (or filename "OUTPUT") (insert text))))
\r
70 (defun visible-buffer-string ()
\r
71 - "Same as `buffer-string', but excludes invisible text."
\r
72 + "Same as `buffer-string', but excludes invisible text and
\r
73 +removes any text properties."
\r
74 (visible-buffer-substring (point-min) (point-max)))
\r
76 (defun visible-buffer-substring (start end)
\r
77 - "Same as `buffer-substring', but excludes invisible text."
\r
78 + "Same as `buffer-substring-no-properties', but excludes
\r
81 (while (< start end)
\r
82 (let ((next-pos (next-char-property-change start end)))
\r
83 (when (not (invisible-p start))
\r
84 - (setq str (concat str (buffer-substring start next-pos))))
\r
85 + (setq str (concat str (buffer-substring-no-properties
\r
86 + start next-pos))))
\r
87 (setq start next-pos)))
\r