[notmuch] [PATCH 1/4] emacs: Don't eat last newline character of citations
[notmuch-archives.git] / 07 / ff24ef103a2d7d9abcb30835eee9a81169708b
1 Return-Path: <kanru@kanru.info>\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 12D4A431FBC\r
6         for <notmuch@notmuchmail.org>; Sun, 13 Dec 2009 21:42:30 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id sk-zEN9FG7l9 for <notmuch@notmuchmail.org>;\r
11         Sun, 13 Dec 2009 21:42:29 -0800 (PST)\r
12 Received: from cp20.secserverpros.com (cp20.secserverpros.com\r
13  [67.220.217.187])      by olra.theworths.org (Postfix) with ESMTP id CFD85431FAE\r
14         for <notmuch@notmuchmail.org>; Sun, 13 Dec 2009 21:42:28 -0800 (PST)\r
15 Received: from 61-228-164-59.dynamic.hinet.net ([61.228.164.59]\r
16         helo=kanru.info)\r
17         by cp20.secserverpros.com with esmtps (TLSv1:AES256-SHA:256)\r
18         (Exim 4.69) (envelope-from <kanru@kanru.info>) id 1NK3hR-0004jX-PZ\r
19         for notmuch@notmuchmail.org; Mon, 14 Dec 2009 05:42:27 +0000\r
20 Received: from kanru (uid 1000) (envelope-from kanru@kanru.info) id 2387\r
21         by kanru.info (DragonFly Mail Agent) Mon, 14 Dec 2009 13:41:52 +0800\r
22 From: Kan-Ru Chen <kanru@kanru.info>\r
23 To: notmuch@notmuchmail.org\r
24 Date: Mon, 14 Dec 2009 13:41:32 +0800\r
25 Message-Id: <1260769295-12924-2-git-send-email-kanru@kanru.info>\r
26 X-Mailer: git-send-email 1.6.5.5\r
27 In-Reply-To: <1260769295-12924-1-git-send-email-kanru@kanru.info>\r
28 References: <1260769295-12924-1-git-send-email-kanru@kanru.info>\r
29 X-ACL-Warn: {\r
30 X-AntiAbuse: This header was added to track abuse,\r
31         please include it with any abuse report\r
32 X-AntiAbuse: Primary Hostname - cp20.secserverpros.com\r
33 X-AntiAbuse: Original Domain - notmuchmail.org\r
34 X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]\r
35 X-AntiAbuse: Sender Address Domain - kanru.info\r
36 X-Source: \r
37 X-Source-Args: \r
38 X-Source-Dir: \r
39 Subject: [notmuch] [PATCH 1/4] emacs: Don't eat last newline character of\r
40         citations\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.12\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Mon, 14 Dec 2009 05:42:30 -0000\r
54 \r
55 In case of a citation following immediately new contents. When the citation\r
56 was collapsed:\r
57 \r
58     [1-line citation. Click/Enter to show.]\r
59 Lorem ipsum dolor sit amet, consectetur adipisicin\r
60 \r
61 When it was expanded:\r
62 \r
63     [10-line citation. Click/Enter to show.]\r
64     >\r
65     Lorem ipsum dolor sit amet, consectetur adipisicin\r
66 \r
67 The indentation was wrong.\r
68 \r
69 Signed-off-by: Kan-Ru Chen <kanru@kanru.info>\r
70 ---\r
71  notmuch.el |    3 ++-\r
72  1 files changed, 2 insertions(+), 1 deletions(-)\r
73 \r
74 diff --git a/notmuch.el b/notmuch.el\r
75 index 97914f2..5823094 100644\r
76 --- a/notmuch.el\r
77 +++ b/notmuch.el\r
78 @@ -606,7 +606,8 @@ which this thread was originally shown."\r
79             (while (looking-at citation)\r
80               (forward-line)\r
81               (move-to-column depth))\r
82 -           (let ((overlay (make-overlay beg-sub (point)))\r
83 +           (end-of-line 0)\r
84 +           (let ((overlay (make-overlay beg-sub  (1+ (point-marker))))\r
85                    (invis-spec (make-symbol "notmuch-citation-region")))\r
86                (add-to-invisibility-spec invis-spec)\r
87               (overlay-put overlay 'invisible invis-spec)\r
88 -- \r
89 1.6.5.5\r
90 \r