Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 22 / aebaaf4f202de087237c856d4e2b35606fb2c3
1 Return-Path: <sojkam1@fel.cvut.cz>\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 arlo.cworth.org (Postfix) with ESMTP id A9C076DE1992\r
6  for <notmuch@notmuchmail.org>; Sat,  2 Jan 2016 08:48:01 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.605\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.605 tagged_above=-999 required=5 tests=[AWL=1.245,\r
12   RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.55] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id AUFG7pGFr14q for <notmuch@notmuchmail.org>;\r
16  Sat,  2 Jan 2016 08:47:58 -0800 (PST)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 857D36DE1962\r
19  for <notmuch@notmuchmail.org>; Sat,  2 Jan 2016 08:47:58 -0800 (PST)\r
20 Received: from localhost (unknown [192.168.200.7])\r
21  by max.feld.cvut.cz (Postfix) with ESMTP id 6964219F48CD\r
22  for <notmuch@notmuchmail.org>; Sat,  2 Jan 2016 17:47:56 +0100 (CET)\r
23 X-Virus-Scanned: IMAP STYX AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25  by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044)\r
26  with ESMTP id wA04puoL6EMA for <notmuch@notmuchmail.org>;\r
27  Sat,  2 Jan 2016 17:47:54 +0100 (CET)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29  by max.feld.cvut.cz (Postfix) with ESMTP id 7F86519F48D2\r
30  for <notmuch@notmuchmail.org>; Sat,  2 Jan 2016 17:47:53 +0100 (CET)\r
31 Received: from wsh by steelpick.2x.cz with local (Exim 4.86)\r
32  (envelope-from <sojkam1@fel.cvut.cz>)\r
33  id 1aFPLM-0007BI-6x; Sat, 02 Jan 2016 17:47:52 +0100\r
34 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH 2/3] emacs: Refactor notmuch-mua-mail\r
37 Date: Sat,  2 Jan 2016 17:47:44 +0100\r
38 Message-Id: <1451753265-26713-3-git-send-email-sojkam1@fel.cvut.cz>\r
39 X-Mailer: git-send-email 2.6.4\r
40 In-Reply-To: <1451753265-26713-1-git-send-email-sojkam1@fel.cvut.cz>\r
41 References: <1451753265-26713-1-git-send-email-sojkam1@fel.cvut.cz>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.20\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46  <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
48  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
53  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Sat, 02 Jan 2016 16:48:01 -0000\r
55 \r
56 This should be more readable.\r
57 ---\r
58  emacs/notmuch-mua.el | 26 +++++++++++++-------------\r
59  1 file changed, 13 insertions(+), 13 deletions(-)\r
60 \r
61 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
62 index d4950cb..2d6825d 100644\r
63 --- a/emacs/notmuch-mua.el\r
64 +++ b/emacs/notmuch-mua.el\r
65 @@ -320,24 +320,24 @@ modified. This function is notmuch addaptation of\r
66                        (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))\r
67  \r
68    (notmuch-mua-pop-to-buffer (message-buffer-name "mail" to))\r
69 -  (let ((args (list yank-action send-actions)))\r
70 +  (let ((headers\r
71 +        ;; The following sexp is copied from `message-mail'\r
72 +        (nconc\r
73 +         `((To . ,(or to "")) (Subject . ,(or subject "")))\r
74 +         ;; C-h f compose-mail says that headers should be specified as\r
75 +         ;; (string . value); however all the rest of message expects\r
76 +         ;; headers to be symbols, not strings (eg message-header-format-alist).\r
77 +         ;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html\r
78 +         ;; We need to convert any string input, eg from rmail-start-mail.\r
79 +         (dolist (h other-headers other-headers)\r
80 +           (if (stringp (car h)) (setcar h (intern (capitalize (car h))))))))\r
81 +       (args (list yank-action send-actions)))\r
82      ;; message-setup-1 in Emacs 23 does not accept return-action\r
83      ;; argument. Pass it only if it is supplied by the caller. This\r
84      ;; will never be the case when we're called by `compose-mail' in\r
85      ;; Emacs 23.\r
86      (when return-action (nconc args '(return-action)))\r
87 -    (apply 'message-setup-1\r
88 -          ;; The following sexp is copied from `message-mail'\r
89 -          (nconc\r
90 -           `((To . ,(or to "")) (Subject . ,(or subject "")))\r
91 -           ;; C-h f compose-mail says that headers should be specified as\r
92 -           ;; (string . value); however all the rest of message expects\r
93 -           ;; headers to be symbols, not strings (eg message-header-format-alist).\r
94 -           ;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html\r
95 -           ;; We need to convert any string input, eg from rmail-start-mail.\r
96 -           (dolist (h other-headers other-headers)\r
97 -             (if (stringp (car h)) (setcar h (intern (capitalize (car h)))))))\r
98 -          args))\r
99 +    (apply 'message-setup-1 headers args))\r
100    (notmuch-fcc-header-setup)\r
101    (message-sort-headers)\r
102    (message-hide-headers)\r
103 -- \r
104 2.6.4\r
105 \r