1 Return-Path: <jrollins@finestructure.net>
\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 6B14A4196F2
\r
6 for <notmuch@notmuchmail.org>; Wed, 21 Apr 2010 21:37:37 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.89 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9, T_MIME_NO_TEXT=0.01] autolearn=ham
\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 c5WglwQcitXU for <notmuch@notmuchmail.org>;
\r
16 Wed, 21 Apr 2010 21:37:36 -0700 (PDT)
\r
17 Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 3C3C7431FC1
\r
19 for <notmuch@notmuchmail.org>; Wed, 21 Apr 2010 21:37:36 -0700 (PDT)
\r
20 Received: from servo.finestructure.net (cpe-72-227-128-66.nyc.res.rr.com
\r
22 (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0)
\r
23 by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o3M4bTIM026373
\r
24 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT)
\r
25 for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 00:37:30 -0400 (EDT)
\r
26 Received: from jrollins by servo.finestructure.net with local (Exim 4.71)
\r
27 (envelope-from <jrollins@finestructure.net>) id 1O4oAK-0001lD-TZ
\r
28 for notmuch@notmuchmail.org; Thu, 22 Apr 2010 00:37:29 -0400
\r
29 From: Jameson Rollins <jrollins@finestructure.net>
\r
30 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
31 Subject: Re: problem with notmuch-search-authors-width in JSON emacs
\r
33 In-Reply-To: <87633ko11s.fsf@servo.finestructure.net>
\r
34 References: <87633ko11s.fsf@servo.finestructure.net>
\r
35 Date: Thu, 22 Apr 2010 00:37:25 -0400
\r
36 Message-ID: <878w8gxfui.fsf@servo.finestructure.net>
\r
38 Content-Type: multipart/signed; boundary="=-=-=";
\r
39 micalg=pgp-sha256; protocol="application/pgp-signature"
\r
40 X-No-Spam-Score: Local
\r
41 X-Scanned-By: MIMEDefang 2.68 on 128.59.29.7
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Thu, 22 Apr 2010 04:37:37 -0000
\r
57 Content-Transfer-Encoding: quoted-printable
\r
59 On Wed, 21 Apr 2010 19:09:35 -0400, Jameson Rollins <jrollins@finestructure=
\r
61 > Hey, folks. I just build from Carl's HEAD which includes the new emacs
\r
62 > JSON interface and I'm noticing a problem with the
\r
63 > notmuch-search-authors-width variable. If I set the variable as
\r
66 > (setq notmuch-search-authors-width 40)
\r
68 > author lists that overrun the specified width start spitting out into
\r
69 > the subject field. I think bremner just confirmed this on irc. I'll
\r
70 > try to look into this when I get a chance, but I don't have time right
\r
71 > now. Maybe someone with more intimate knowledge of this piece of code
\r
72 > could figure it out more quickly.
\r
74 So I think I see what might be happening here, but I don't know elisp
\r
75 well enough to fix it. Maybe one of the elisp experts out there can
\r
76 help me figure it out.
\r
78 notmuch-search-authors-width is actually called three times in
\r
81 0 servo:~/src/notmuch/git [master] $ grep -nH notmuch-search-authors-width =
\r
83 emacs/notmuch.el:57:(defcustom notmuch-search-authors-width 20
\r
84 emacs/notmuch.el:65: ("authors" . ,(format "%%-%ds " notmuch-search-auth=
\r
86 emacs/notmuch.el:626: (if (> authors-length notmuch-search-authors-w=
\r
88 emacs/notmuch.el:627: (set 'authors (concat (substring authors 0 (- not=
\r
89 much-search-authors-width 3)) "...")))
\r
90 0 servo:~/src/notmuch/git [master] $=20
\r
92 The first call is inside the defcustom definition for
\r
93 notmuch-search-result-format. The second two are in the
\r
94 notmuch-search-process-filter function. It's pretty clear from the
\r
95 behavior that setting notmuch-search-authors-width, either with setq or
\r
96 with "Customize Options", affects what is returned in
\r
97 notmuch-search-process-filter, but *not* in the defcustom for
\r
98 notmuch-search-result-format. I guess what's happening is that the
\r
99 value used in the defcustom definition of notmuch-search-result-format
\r
100 is set when the defcustom is defined, and isn't changed later with the
\r
101 new user-set value.
\r
103 Do any elisp experts out there know any way out of this? Is there a way
\r
104 to escape the expansion of the variable used in
\r
105 notmuch-search-result-format until it is actually called?
\r
107 I guess we're using notmuch-search-authors-width to "nicely" truncate
\r
108 the author list and add the "..." at the end. We could just straight
\r
109 truncate the authors field with something like '%-.40s', I think, which
\r
110 would make the code a little simpler, but might not be as nice.
\r
115 Content-Type: application/pgp-signature
\r
117 -----BEGIN PGP SIGNATURE-----
\r
118 Version: GnuPG v1.4.10 (GNU/Linux)
\r
120 iQIcBAEBCAAGBQJLz9KFAAoJEO00zqvie6q8RA8QAIglvTm67b8P5PpSWT15w3zv
\r
121 DkXNkE1IaW1M27DHZ2ooDsIPV8+iVYsyFDir85b+kXjQw6yURtwjOyqv6b0C13xp
\r
122 XJ0a8h3iE8A1mYptM7SVUT/yJ2Lx5MZ6e+7vp/Dw2nwk8o3F+BZP/6CY8nAdrBar
\r
123 tMiTWAU0wvNGeLrd9kp7IntOfaO/Tq0ksVUq6djhO44YwH4KdMdRWZ+crdavt0sj
\r
124 f5BKM042+BoSHW804Aob8dDWCDEQ7cEhGbOwvEVmdNHcq/eUtjX7QXp47QsJznJV
\r
125 cyj2pb6ZssN4Ve1btuZNi/CLRvr8nqgK8dkvvZJ/ZOirNPWtkxJV7j/RZAumr2xZ
\r
126 Xu7yZsXClwdyBmNVXtWnE/raXhPlmdwM0w6/kxq0sZKj2zTcU4dngryQPQpnxn2s
\r
127 VH5+DC4pD8YXi85fQupDD+QDmL2l5NblAVRPeacPv4VaEkrFU3cQRV1h8m49mvKZ
\r
128 zoSwFmmNDsh1Em8G4pzM0Qo9ezikgmZOvSWjl3FuQmei7xbtnlRofkGiS5K4wUdk
\r
129 eLM4U0SfdKpfbiU0Sj8qErI/eoSI3zGwyAIYXPfxu6NZyVUAwHFffW5TEohk6doi
\r
130 azD3VBRbwuLKdHfDk2BYGqC9Tm7vZrM/7o7wNd7MQHgwI+wx0Tck5e6oBahpgKvL
\r
131 Ffn9cpotBbdDKfbMwzTf
\r
133 -----END PGP SIGNATURE-----
\r