Re: notmuch-emacs should correctly handle signature status on reply
[notmuch-archives.git] / 77 / 7c52d7adfef1c19a1c2bd4bfd9d27ae0c2572d
1 Return-Path: <too@guru-group.fi>\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 F2730431FB6\r
6         for <notmuch@notmuchmail.org>; Wed,  3 Oct 2012 23:55:11 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 Ap6ptv8mRRkr for <notmuch@notmuchmail.org>;\r
16         Wed,  3 Oct 2012 23:55:11 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 2CE60431FAE\r
19         for <notmuch@notmuchmail.org>; Wed,  3 Oct 2012 23:55:11 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 7772B100257; Thu,  4 Oct 2012 09:55:14 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single\r
25         CR removal\r
26 Date: Thu,  4 Oct 2012 09:55:12 +0300\r
27 Message-Id: <1349333712-18347-1-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.7.1\r
29 Cc: tomi.ollila@iki.fi\r
30 X-BeenThere: notmuch@notmuchmail.org\r
31 X-Mailman-Version: 2.1.13\r
32 Precedence: list\r
33 List-Id: "Use and development of the notmuch mail system."\r
34         <notmuch.notmuchmail.org>\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
36         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
38 List-Post: <mailto:notmuch@notmuchmail.org>\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
42 X-List-Received-Date: Thu, 04 Oct 2012 06:55:12 -0000\r
43 \r
44 In case text/calendar content contained "folded" data (i.e. line\r
45 continues to next line which begins with whitespace...\r
46 \r
47 or\r
48 \r
49 The text/calendar content is inside separate (application/octet-stream)\r
50 content and the text/calendar entry there contains carriage returns...\r
51 \r
52 ... The parsing of text/calendar content failed so badly that in\r
53 addition to just not showing the calendar content the rest of content\r
54 handling of the thread aborted.\r
55 \r
56 In this change the input calendar content is unfolded extending the\r
57 unfolding code used in `icalendar--get-unfolded-buffer` with single CRs\r
58 removal.\r
59 ---\r
60  emacs/notmuch-show.el |    5 +++++\r
61  1 files changed, 5 insertions(+), 0 deletions(-)\r
62 \r
63 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
64 index 86130ce..2a07e28 100644\r
65 --- a/emacs/notmuch-show.el\r
66 +++ b/emacs/notmuch-show.el\r
67 @@ -750,6 +750,11 @@ message at DEPTH in the current thread."\r
68             (goto-char (point-min))\r
69             (let ((file (make-temp-file "notmuch-ical"))\r
70                   result)\r
71 +             ;; `icalendar--get-unfolded-buffer' unfolds with "\r?\n[ \t]".\r
72 +             ;; This unfolding extends that by removing other CRs too.\r
73 +             (while (re-search-forward "\\(\r\\|\r?\n[ \t]\\)" nil t)\r
74 +               (replace-match "" nil nil))\r
75 +             (goto-char (point-min))\r
76               (icalendar--convert-ical-to-diary\r
77                (icalendar--read-element nil nil)\r
78                file t)\r
79 -- \r
80 1.7.1\r
81 \r