Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 9d / b49fecba72a300bfef39539c310931c15c513b
1 Return-Path: <cworth@cworth.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 olra.theworths.org (Postfix) with ESMTP id A283C431FBF;\r
6         Tue, 15 Dec 2009 13:22:20 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id bYvptj4LMOsi; Tue, 15 Dec 2009 13:22:20 -0800 (PST)\r
11 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
12         by olra.theworths.org (Postfix) with ESMTP id EABE4431FAE;\r
13         Tue, 15 Dec 2009 13:22:19 -0800 (PST)\r
14 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
15         id 890B1254306; Tue, 15 Dec 2009 13:22:19 -0800 (PST)\r
16 From: Carl Worth <cworth@cworth.org>\r
17 To: Andreas =?iso-8859-1?q?Kl=F6ckner?= <lists@informa.tiker.net>,\r
18         notmuch@notmuchmail.org\r
19 In-Reply-To: <200912141421.52561.lists@informa.tiker.net>\r
20 References: <200912141421.52561.lists@informa.tiker.net>\r
21 Date: Tue, 15 Dec 2009 13:22:19 -0800\r
22 Message-ID: <87zl5k0w6s.fsf@yoom.home.cworth.org>\r
23 MIME-Version: 1.0\r
24 Content-Type: multipart/signed; boundary="=-=-=";\r
25         micalg=pgp-sha1; protocol="application/pgp-signature"\r
26 Subject: Re: [notmuch] [patch] store folder information\r
27 X-BeenThere: notmuch@notmuchmail.org\r
28 X-Mailman-Version: 2.1.12\r
29 Precedence: list\r
30 List-Id: "Use and development of the notmuch mail system."\r
31         <notmuch.notmuchmail.org>\r
32 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
33         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
34 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
35 List-Post: <mailto:notmuch@notmuchmail.org>\r
36 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
37 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
38         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
39 X-List-Received-Date: Tue, 15 Dec 2009 21:22:20 -0000\r
40 \r
41 --=-=-=\r
42 Content-Type: text/plain; charset=utf-8\r
43 Content-Transfer-Encoding: quoted-printable\r
44 \r
45 On Mon, 14 Dec 2009 14:21:50 -0500, Andreas Kl=C3=B6ckner <lists@informa.ti=\r
46 ker.net> wrote:\r
47 > I've patched notmuch to retain information on which folder emails are sto=\r
48 red=20\r
49 > in. This makes the transition from a folders-and-procmail model somewhat=\r
50 =20\r
51 > easier. The resulting changes are attached.\r
52 \r
53 Very nice. I like this idea very much.\r
54 \r
55 (We recently had discussions about automatically adding tags based on\r
56 the directories in which mail files were found, and I said I'd prefer a\r
57 solution which allowed the user to search on the directory name\r
58 instead.)\r
59 \r
60 > @@ -116,6 +116,8 @@ skip_re_in_subject (const char *subject)\r
61 >           s++;\r
62 >       if (strncasecmp (s, "re:", 3) =3D=3D 0)\r
63 >           s +=3D 3;\r
64 > +        else if (strncasecmp (s, "aw:", 3) =3D=3D 0)\r
65 > +         s +=3D 3;\r
66 >       else\r
67 >           break;\r
68 >      }\r
69 \r
70 This hunk looks unrelated to the rest. Could you submit that separately,\r
71 please?\r
72 \r
73 > +    gchar *full_folder_name =3D NULL;\r
74 > +    gchar *folder_base_name =3D NULL;\r
75 > +\r
76 > +    /* Find name of "folder" containing the email. */\r
77 > +    full_folder_name =3D g_strdup(path);\r
78 > +    while (1)\r
79 > +    {\r
80 > +        folder_base_name =3D g_path_get_basename(full_folder_name);\r
81 \r
82 The trailing directory name is available already during the\r
83 traversal. So you don't need to search it back out again. See the patch\r
84 in the following message:\r
85 \r
86         id:87fx8bygi7.fsf@linux.vnet.ibm.com\r
87 \r
88 which simply passes the trailing directory name along, (but skipping a\r
89 name of "cur" or "new" while traversing).\r
90 \r
91 That kind of approach looks a lot nice to me.\r
92 \r
93 Beyond that, though, I imagine some people have hierarchical folders as\r
94 well, so it probably makes sense to store them as well.\r
95 \r
96 To do that, it's probably just a matter of calling gen_terms on the\r
97 complete filename. I haven't tested, but doing that should allow\r
98 Xapian's phrase searching to do the right thing for something like:\r
99 \r
100         filename:portion/of/the/path/name\r
101 \r
102 I think something like that is what I would like to see.\r
103 \r
104 =2DCarl\r
105 \r
106 --=-=-=\r
107 Content-Type: application/pgp-signature\r
108 \r
109 -----BEGIN PGP SIGNATURE-----\r
110 Version: GnuPG v1.4.10 (GNU/Linux)\r
111 \r
112 iD8DBQFLJ/4L6JDdNq8qSWgRAlqQAJ450V1v9PiBPbdZtBL+LQQUP6xpZgCgnsDT\r
113 ZAamkCwVBB/VzW5Sg3s0214=\r
114 =8NFI\r
115 -----END PGP SIGNATURE-----\r
116 --=-=-=--\r