[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 48 / 6de0950d907026b4c1d24c24a870db2d0862b1
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 56609431FB6\r
6         for <notmuch@notmuchmail.org>; Sun, 20 May 2012 09:58:07 -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 YJ5d1CvO+SXW for <notmuch@notmuchmail.org>;\r
16         Sun, 20 May 2012 09:58:06 -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 25B5A431FAE\r
19         for <notmuch@notmuchmail.org>; Sun, 20 May 2012 09:58:05 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 77F9710064B; Sun, 20 May 2012 19:58:16 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH] emacs: use 'gnus-decoded in notmuch-mm-display-part-inline ()\r
25 Date: Sun, 20 May 2012 19:58:14 +0300\r
26 Message-Id: <1337533094-5467-1-git-send-email-tomi.ollila@iki.fi>\r
27 X-Mailer: git-send-email 1.7.1\r
28 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
29 X-BeenThere: notmuch@notmuchmail.org\r
30 X-Mailman-Version: 2.1.13\r
31 Precedence: list\r
32 List-Id: "Use and development of the notmuch mail system."\r
33         <notmuch.notmuchmail.org>\r
34 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
35         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
36 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
37 List-Post: <mailto:notmuch@notmuchmail.org>\r
38 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
39 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
40         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
41 X-List-Received-Date: Sun, 20 May 2012 16:58:07 -0000\r
42 \r
43 When mail message is read from emacs, the message structure\r
44 obtained may contain parts which have content included\r
45 (`text/plain` for example) and other parts where content is not\r
46 included (`text/html` for example).\r
47 \r
48 In case content is included, the string is already available in\r
49 emacs' internal format and therefore mm-... functions should not\r
50 attempt to do further decoding for the data in temp buffer\r
51 provided for it.\r
52 \r
53 Currently when reply buffer is created,\r
54 notmuch-mm-display-part-inline () is used to provided quoted reply\r
55 content. This change makes the mm-... functions called by it use\r
56 'gnus-decoded as charset whenever the content is already available.\r
57 \r
58 File .../emacs-23.3/lisp/gnus/mm-uu.el mentions:\r
59 "`gnus-decoded' is a fake charset, which means no further decoding."\r
60 ---\r
61 \r
62 I propose this patch is taken into 0.13.1.\r
63 \r
64 Please note that I'm not entirely sure my description above\r
65 is right. So those who knows more of these issues please check\r
66 my "facts".\r
67 \r
68 Note that before this change the only reference to word 'gnus' in\r
69 the whole notmuch repository is:\r
70 ./emacs/notmuch-wash.el:223:  ;; `gnus-art.el'.\r
71 \r
72 if anybody thinks this matters...\r
73 \r
74  emacs/notmuch-lib.el |    7 ++++++-\r
75  1 files changed, 6 insertions(+), 1 deletions(-)\r
76 \r
77 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
78 index 7fa441a..e99b48d 100644\r
79 --- a/emacs/notmuch-lib.el\r
80 +++ b/emacs/notmuch-lib.el\r
81 @@ -244,7 +244,12 @@ the given type."\r
82  current buffer, if possible."\r
83    (let ((display-buffer (current-buffer)))\r
84      (with-temp-buffer\r
85 -      (let* ((charset (plist-get part :content-charset))\r
86 +      ;; In case there is :content, the content string is already converted\r
87 +      ;; into emacs internal format. `gnus-decoded' is a fake charset,\r
88 +      ;; which means no further decoding (to be done by mm- functions).\r
89 +      (let* ((charset (if (plist-member part :content)\r
90 +                         'gnus-decoded\r
91 +                       (plist-get part :content-charset)))\r
92              (handle (mm-make-handle (current-buffer) `(,content-type (charset . ,charset)))))\r
93         ;; If the user wants the part inlined, insert the content and\r
94         ;; test whether we are able to inline it (which includes both\r
95 -- \r
96 1.7.1\r
97 \r