1 Return-Path: <zack@upsilon.cc>
\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 AB88F431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 11:52:52 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 IJ-uS03iezqv for <notmuch@notmuchmail.org>;
\r
16 Mon, 26 Mar 2012 11:52:51 -0700 (PDT)
\r
17 Received: from upsilon.hackadomia.org (upsilon.hackadomia.org
\r
18 [91.121.245.170]) by olra.theworths.org (Postfix) with ESMTP id 2BB4E431FAE
\r
19 for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 11:52:51 -0700 (PDT)
\r
20 Received: from usha.takhisis.invalid (zack.inria.fr [128.93.60.82])
\r
21 by upsilon.hackadomia.org (Postfix) with ESMTPSA id 2DEA310131
\r
22 for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 20:52:49 +0200 (CEST)
\r
23 Received: by usha.takhisis.invalid (Postfix, from userid 1000)
\r
24 id 079FE681CAD; Mon, 26 Mar 2012 20:52:49 +0200 (CEST)
\r
25 Date: Mon, 26 Mar 2012 20:52:49 +0200
\r
26 From: Stefano Zacchiroli <zack@upsilon.cc>
\r
27 To: notmuch@notmuchmail.org
\r
28 Subject: Re: Bug#628018: [PATCH] notmuch-mutt utility for notmuch/contrib/
\r
29 Message-ID: <20120326185249.GA2534@upsilon.cc>
\r
30 Mail-Followup-To: notmuch@notmuchmail.org, Stefano Zacchiroli
\r
32 References: <87ehsfr6lb.fsf@zancas.localnet>
\r
33 <m2aa33o81v.fsf@guru.guru-group.fi>
\r
34 <87d37zl7qe.fsf@servo.finestructure.net>
\r
35 <20120326152902.GA11610@upsilon.cc>
\r
37 Content-Type: multipart/signed; micalg=pgp-sha256;
\r
38 protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP"
\r
39 Content-Disposition: inline
\r
40 In-Reply-To: <20120326152902.GA11610@upsilon.cc>
\r
41 User-Agent: Mutt/1.5.21 (2010-09-15)
\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: Mon, 26 Mar 2012 18:52:52 -0000
\r
58 Content-Type: multipart/mixed; boundary="LZvS9be/3tNcYl/X"
\r
59 Content-Disposition: inline
\r
63 Content-Type: text/plain; charset=iso-8859-1
\r
64 Content-Disposition: inline
\r
65 Content-Transfer-Encoding: quoted-printable
\r
67 On Mon, Mar 26, 2012 at 05:29:02PM +0200, Stefano Zacchiroli wrote:
\r
68 > But while it's trivial to make notmuch-mutt itself support
\r
69 > $XDG_CACHE_HOME, it is less so for the Mutt configuration snippet
\r
70 > (i.e. the notmuch-mutt.rc file which is part of my submission). AFAICT
\r
71 > the <change-folder-readonly> function does not support variable
\r
72 > expansions, not to mention default values while doing so.
\r
74 =2E.. but Mutt configuration has backtick expansions! So never mind the
\r
77 The attached patch should be all that's needed to proper $XDG_CACHE_HOME
\r
78 support, according to XDG basedir spec.
\r
80 If you folks now consider the contrib submission good enough for
\r
81 inclusion, feel free to just "git am" the 3 patches. If you want me to
\r
82 implement other changes --- including bureaucratic stuff like merging
\r
83 patches together --- just let me know!
\r
87 Stefano Zacchiroli zack@{upsilon.cc,pps.jussieu.fr,debian.org} . o .
\r
88 Ma=EEtre de conf=E9rences ...... http://upsilon.cc/zack ...... . . o
\r
89 Debian Project Leader ....... @zack on identi.ca ....... o o o
\r
90 =AB the first rule of tautology club is the first rule of tautology club =BB
\r
93 Content-Type: text/x-diff; charset=us-ascii
\r
94 Content-Disposition: attachment; filename="0003-notmuch-mutt-XDG_CACHE_HOME-support-as-per-XDG-based.patch"
\r
95 Content-Transfer-Encoding: quoted-printable
\r
97 =46rom f68f36448f5bc63211c12b9e53e9db603ed76178 Mon Sep 17 00:00:00 2001
\r
98 =46rom: Stefano Zacchiroli <zack@upsilon.cc>
\r
99 Date: Mon, 26 Mar 2012 20:47:34 +0200
\r
100 Subject: [PATCH] notmuch-mutt: $XDG_CACHE_HOME support as per XDG basedir
\r
104 contrib/notmuch-mutt/notmuch-mutt | 4 +++-
\r
105 contrib/notmuch-mutt/notmuch-mutt.rc | 4 ++--
\r
106 2 files changed, 5 insertions(+), 3 deletions(-)
\r
107 mode change 100755 =3D> 100644 contrib/notmuch-mutt/notmuch-mutt
\r
109 diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/notmu=
\r
113 index 29674ec..9cd01ec
\r
114 --- a/contrib/notmuch-mutt/notmuch-mutt
\r
115 +++ b/contrib/notmuch-mutt/notmuch-mutt
\r
116 @@ -20,7 +20,9 @@ use String::ShellQuote;
\r
117 use Term::ReadLine;
\r
120 -my $cache_dir =3D "$ENV{HOME}/.cache/notmuch/mutt";
\r
121 +my $xdg_cache_dir =3D "$ENV{HOME}/.cache";
\r
122 +$xdg_cache_dir =3D $ENV{XDG_CACHE_HOME} if $ENV{XDG_CACHE_HOME};
\r
123 +my $cache_dir =3D "$xdg_cache_dir/notmuch/mutt";
\r
126 # create an empty maildir (if missing) or empty an existing maildir"
\r
127 diff --git a/contrib/notmuch-mutt/notmuch-mutt.rc b/contrib/notmuch-mutt/no=
\r
129 index 269f03f..c0ff000 100644
\r
130 --- a/contrib/notmuch-mutt/notmuch-mutt.rc
\r
131 +++ b/contrib/notmuch-mutt/notmuch-mutt.rc
\r
134 - "<enter-command>unset wait_key<enter><shell-escape>notmuch-mutt --pr=
\r
135 ompt search<enter><change-folder-readonly>~/.cache/notmuch/mutt/results<ent=
\r
137 + "<enter-command>unset wait_key<enter><shell-escape>notmuch-mutt --pr=
\r
138 ompt search<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.ca=
\r
139 che}/notmuch/mutt/results`<enter>" \
\r
140 "notmuch: search mail"
\r
142 - "<enter-command>unset wait_key<enter><pipe-message>notmuch-mutt thre=
\r
143 ad<enter><change-folder-readonly>~/.cache/notmuch/mutt/results<enter><enter=
\r
144 -command>set wait_key<enter>" \
\r
145 + "<enter-command>unset wait_key<enter><pipe-message>notmuch-mutt thre=
\r
146 ad<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notm=
\r
147 uch/mutt/results`<enter><enter-command>set wait_key<enter>" \
\r
148 "notmuch: reconstruct thread"
\r
150 "<enter-command>unset wait_key<enter><pipe-message>notmuch-mutt tag =
\r
156 --LZvS9be/3tNcYl/X--
\r
159 Content-Type: application/pgp-signature; name="signature.asc"
\r
160 Content-Description: Digital signature
\r
162 -----BEGIN PGP SIGNATURE-----
\r
163 Version: GnuPG v1.4.12 (GNU/Linux)
\r
165 iQIVAwUBT3C7AJwxUDxthmOWAQjA7A/9Ebr60Dg4h6uCDYPd+cRwlQT9EwBZfxb0
\r
166 fe3oNwH61paegJ8tiPANqYnExJhxwKkcmqEIhpddvkjLRsvs0upsnrjLfJ6vho3e
\r
167 E7GFAycAeZR2pcT2SUG/2dzlo9izQMzoMOWRZD5RPVC/k4G0ZoDI4BPs4x0usgtN
\r
168 rS/8n4tIYGHkH1+BPsyN6R3UDBDAngB5G2xcfBH/WCjV+IomcytYypofIyeTUaR9
\r
169 VT/eYMYvCU7oLrIQK8qe/tPgag2sw3MrOb/KzXcQGjl2rQ+Q+6JRqJJac7xq01Y+
\r
170 3SCjA2I30vlcrcese8A4rL+UgRIIhESCfjSg4i6eTqvEtw8V8Twf/bEJOHqiRAu1
\r
171 8s9mQ3fhOmD679Wg76fi7tA5vFjgotg/3kAVA6TRSLNZfSyHFLaSu8rplrlD6mJ0
\r
172 LjGM+G7Dg/cZYjSzSrzs9UYKsbLS/yOlyy8ygrKlfQtVSxn6t4L7fShuP5bAuqpv
\r
173 nwuykfLTqzhq3AAZCXsrmnDHgYwvL1e3s7G0ZKU9adEFv9tJ0++iO8JiTpZ6eoaW
\r
174 XA+WFr5KE1mFCBjSMLT1Z6Bl/645vIjFDfJ2xZvX7P11wlnmWVKwm9r4NHvglFhB
\r
175 pdvfKzvW3Z9FAIYtMY/2ISMorNaFbwkvdFxW9ndQPrkjUm03Wq/Fk5hGmyq9iLx3
\r
178 -----END PGP SIGNATURE-----
\r
180 --gatW/ieO32f1wygP--
\r