Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 61 / ba7ee55028b7095c6e7dbee2723c3d8a131620
1 Return-Path: <jani@nikula.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 arlo.cworth.org (Postfix) with ESMTP id AE99A6DE610B\r
6  for <notmuch@notmuchmail.org>; Sun, 14 Aug 2016 07:26:09 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.579\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.579 tagged_above=-999 required=5 tests=[AWL=0.141,\r
12   DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\r
13  RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled\r
14 Received: from arlo.cworth.org ([127.0.0.1])\r
15  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
16  with ESMTP id csHk9eXfkuVU for <notmuch@notmuchmail.org>;\r
17  Sun, 14 Aug 2016 07:25:59 -0700 (PDT)\r
18 Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com\r
19  [74.125.82.50]) by arlo.cworth.org (Postfix) with ESMTPS id 843226DE76FF for\r
20  <notmuch@notmuchmail.org>; Sun, 14 Aug 2016 06:36:49 -0700 (PDT)\r
21 Received: by mail-wm0-f50.google.com with SMTP id q128so51554107wma.1\r
22  for <notmuch@notmuchmail.org>; Sun, 14 Aug 2016 06:36:49 -0700 (PDT)\r
23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
24  d=nikula-org.20150623.gappssmtp.com; s=20150623;\r
25  h=from:to:cc:subject:in-reply-to:references:date:message-id\r
26  :mime-version; bh=Ru8pXx1QDo5bSGsapD4PDhjrN0I90TIG5O3qgHucg/Y=;\r
27  b=HHoK4DIXh/nyFxN2lV0icTilX2Hxps1QOtw7/LilpGRA3ifrLPcWhefgjSSc/MHUye\r
28  m+jODUXtY9fXP6RsagR8WuZtoZj6GOtzKHGuilNgQg2G0BNwPBy3svPxVvZ8WPMUbY9k\r
29  HT1AP/Y2P9PyTY6S+pEYM1Rcup2E2oyCOwFYLedx1whqM8iJS39rbZPT2WCljHHjFwES\r
30  O3X0M1LyAyN73VvrbryDlNh5QwvUBNkIvOopeV1vEFs+Fo2BaX21u28QlZPUupo11zf4\r
31  991SdrlziJtwL7kzCff9yQj1mKlURaPlpgJaaOOMSUlZEjVQ/sYEBmtT+bGWfBAMGSG/\r
32  eraw==\r
33 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
34  d=1e100.net; s=20130820;\r
35  h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date\r
36  :message-id:mime-version;\r
37  bh=Ru8pXx1QDo5bSGsapD4PDhjrN0I90TIG5O3qgHucg/Y=;\r
38  b=IYwiMeUvYP4cuu+Fhd7LmMGVR+r0lWU8/R5cmQZHIrKvk5fapQyq/XSR9mhXOTTSKU\r
39  mu195JEk1c9kD9953gKVerlah7yPOM9Sx5bQ2dgwvX4fggTmz3sJMHd9kA87WOKKnLBX\r
40  6Lm/ooDjlSrw+tiSd3UDuZNmYBFa0B+PEndBbUPwE96hLaGJ3NvHMm6PUkNrworA9oAf\r
41  wEipfVM+ufz3J8mUTEAucqeqRp1MeyJZod1na7GrebaIEhNK/C19LXxmj6WTHXGfMe0g\r
42  CeW20E/0lLVKzdXKtgkPEJ1QSLLHjj3VBiXEBv8XnlO2fAH/gPl7uHpTcjgTDfmgNOUF\r
43  flaw==\r
44 X-Gm-Message-State:\r
45  AEkoousWDEHqZYwUPsBY1XWEKgIvnHvUoRLELIPOoZTalULEldSSvUDh/7/PBdZiwQ1r0A==\r
46 X-Received: by 10.194.29.2 with SMTP id f2mr24579056wjh.161.1471181799706;\r
47  Sun, 14 Aug 2016 06:36:39 -0700 (PDT)\r
48 Received: from localhost (mobile-access-bcee63-250.dhcp.inet.fi.\r
49  [188.238.99.250])\r
50  by smtp.gmail.com with ESMTPSA id pm1sm16692784wjb.40.2016.08.14.06.36.38\r
51  (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
52  Sun, 14 Aug 2016 06:36:39 -0700 (PDT)\r
53 From: Jani Nikula <jani@nikula.org>\r
54 To: Shea Levy <shea@shealevy.com>, notmuch@notmuchmail.org\r
55 Subject: Re: [PATCH 0/4] Allow specifying alternate names for addresses in\r
56  other_email\r
57 In-Reply-To:\r
58  <87oa4vtta4.fsf@shlevy-laptop.i-did-not-set--mail-host-address--so-tickle-me>\r
59 References: <1470776118-5070-1-git-send-email-shea@shealevy.com>\r
60  <87k2fk98yh.fsf@nikula.org>\r
61  <87oa4vtta4.fsf@shlevy-laptop.i-did-not-set--mail-host-address--so-tickle-me>\r
62 Date: Sun, 14 Aug 2016 16:35:13 +0300\r
63 Message-ID: <874m6no4mm.fsf@nikula.org>\r
64 MIME-Version: 1.0\r
65 Content-Type: text/plain\r
66 X-BeenThere: notmuch@notmuchmail.org\r
67 X-Mailman-Version: 2.1.20\r
68 Precedence: list\r
69 List-Id: "Use and development of the notmuch mail system."\r
70  <notmuch.notmuchmail.org>\r
71 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
72  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
74 List-Post: <mailto:notmuch@notmuchmail.org>\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
76 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
77  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
78 X-List-Received-Date: Sun, 14 Aug 2016 14:26:09 -0000\r
79 \r
80 On Sun, 14 Aug 2016, Shea Levy <shea@shealevy.com> wrote:\r
81 > Jani Nikula <jani@nikula.org> writes:\r
82 >\r
83 >> On Tue, 09 Aug 2016, Shea Levy <shea@shealevy.com> wrote:\r
84 >>> Currently, while notmuch-reply will recognize email addresses other than\r
85 >>> the main address with user.other_email, it always sets the name part of\r
86 >>> the address in the envelope-from and From headers to user.name. This\r
87 >>> patchset enables specifying names on a per-address basis with a new\r
88 >>> user.other_name property. Presumably other users of user.other_email\r
89 >>> may want to use this as well, but those are not updated currently.\r
90 >>\r
91 >> I am not convinved by adding another configuration option, especially\r
92 >> when it has to be in sync with another configuration option (ordering in\r
93 >> user.other_name having to match user.other_email). I would much prefer\r
94 >> allowing (but not requiring) "Name <user@example.org>" style addresses\r
95 >> both in user.primary_email and user.other_email.\r
96 >>\r
97 >\r
98 > This would be fine with me. Is there already code in place to separate\r
99 > out the name and email values from that kind of email address?\r
100 \r
101 I think we should use gmime for this, and expect the configuration to be\r
102 a comma separated list of addresses, specifically in the format that\r
103 internet_address_list_parse_string() parses [2]. On the plus side, it'll\r
104 handle most of the weird corner cases about (lists of) email addresses,\r
105 and we can probably safely ignore the ones it doesn't handle. We already\r
106 use that stuff in notmuch-show.c and notmuch-reply.c. On the minus side,\r
107 using the functions is about as much fun as string manipulation\r
108 generally is in C.\r
109 \r
110 Then there's the annoying detail that this'll change the format of the\r
111 config from a semicolon separated list to a comma separated list. This\r
112 means switching from using g_key_file_get_string_list() to\r
113 g_key_file_get_string(). But we also need to have backward compatibility\r
114 somehow. One option is to add a new config option (didn't I just frown\r
115 on adding new ones?) that would replace all of user.name,\r
116 user.primary_email, and user.other_email, making the first in the list\r
117 the primary one. So we could check if, say, user.email is present, and\r
118 use that for all of the name/primary/other configuration, falling back\r
119 to the separate fields otherwise. This is also a safe option in case\r
120 some other software uses the configuration options directly.\r
121 \r
122 Anyway, this will be slightly tedious to code, and some of the changes\r
123 might be a bit controversial, so I suggest waiting until we get feedback\r
124 from others first. (David, I'm looking at you!)\r
125 \r
126 >> With a cursory glance at the implementation, I wonder if you could just\r
127 >> pick the name based on the address you've picked earlier, and leave the\r
128 >> address matching mostly as it is. Would save some passing of parameters\r
129 >> around. Maybe.\r
130 >>\r
131 >\r
132 > Hmm, I'm not sure what you mean by this, sorry. Can you expand?\r
133 \r
134 Only match the *address* part, and when you've found a match, find the\r
135 corresponding name part. Or do you need to be able to distinguish\r
136 between different names with the same address?\r
137 \r
138 No matter what, I think the first thing should be changing just the\r
139 config, and then building the rest on top afterwards.\r
140 \r
141 >> Additionally, I'd very much like to have my series [1] merged\r
142 >> first. It'll be *much* easier to rebase your series on top than the\r
143 >> other way around...\r
144 >>\r
145 >\r
146 > Happy to rebase my work on yours.\r
147 \r
148 Of course, lacking review, there's no guarantee my series actually gets\r
149 merged. It's open source, first come, first served!\r
150 \r
151 \r
152 BR,\r
153 Jani.\r
154 \r
155 \r
156 >>\r
157 >> [1] id:cover.1471088022.git.jani@nikula.org\r
158 \r
159 [2] https://developer.gnome.org/gmime/stable/InternetAddressList.html\r