From: Stefano Zacchiroli Date: Mon, 26 Mar 2012 18:52:49 +0000 (+0200) Subject: Re: Bug#628018: [PATCH] notmuch-mutt utility for notmuch/contrib/ X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=112e67b814137aa3a5012997c14cfe9668c838d1;p=notmuch-archives.git Re: Bug#628018: [PATCH] notmuch-mutt utility for notmuch/contrib/ --- diff --git a/8b/14da4897aaa02515c16a8b283de4f03904d3f5 b/8b/14da4897aaa02515c16a8b283de4f03904d3f5 new file mode 100644 index 000000000..b71a48855 --- /dev/null +++ b/8b/14da4897aaa02515c16a8b283de4f03904d3f5 @@ -0,0 +1,180 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id AB88F431FAF + for ; Mon, 26 Mar 2012 11:52:52 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id IJ-uS03iezqv for ; + Mon, 26 Mar 2012 11:52:51 -0700 (PDT) +Received: from upsilon.hackadomia.org (upsilon.hackadomia.org + [91.121.245.170]) by olra.theworths.org (Postfix) with ESMTP id 2BB4E431FAE + for ; Mon, 26 Mar 2012 11:52:51 -0700 (PDT) +Received: from usha.takhisis.invalid (zack.inria.fr [128.93.60.82]) + by upsilon.hackadomia.org (Postfix) with ESMTPSA id 2DEA310131 + for ; Mon, 26 Mar 2012 20:52:49 +0200 (CEST) +Received: by usha.takhisis.invalid (Postfix, from userid 1000) + id 079FE681CAD; Mon, 26 Mar 2012 20:52:49 +0200 (CEST) +Date: Mon, 26 Mar 2012 20:52:49 +0200 +From: Stefano Zacchiroli +To: notmuch@notmuchmail.org +Subject: Re: Bug#628018: [PATCH] notmuch-mutt utility for notmuch/contrib/ +Message-ID: <20120326185249.GA2534@upsilon.cc> +Mail-Followup-To: notmuch@notmuchmail.org, Stefano Zacchiroli + +References: <87ehsfr6lb.fsf@zancas.localnet> + + <87d37zl7qe.fsf@servo.finestructure.net> + <20120326152902.GA11610@upsilon.cc> +MIME-Version: 1.0 +Content-Type: multipart/signed; micalg=pgp-sha256; + protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" +Content-Disposition: inline +In-Reply-To: <20120326152902.GA11610@upsilon.cc> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 26 Mar 2012 18:52:52 -0000 + + +--gatW/ieO32f1wygP +Content-Type: multipart/mixed; boundary="LZvS9be/3tNcYl/X" +Content-Disposition: inline + + +--LZvS9be/3tNcYl/X +Content-Type: text/plain; charset=iso-8859-1 +Content-Disposition: inline +Content-Transfer-Encoding: quoted-printable + +On Mon, Mar 26, 2012 at 05:29:02PM +0200, Stefano Zacchiroli wrote: +> But while it's trivial to make notmuch-mutt itself support +> $XDG_CACHE_HOME, it is less so for the Mutt configuration snippet +> (i.e. the notmuch-mutt.rc file which is part of my submission). AFAICT +> the function does not support variable +> expansions, not to mention default values while doing so. + +=2E.. but Mutt configuration has backtick expansions! So never mind the +above. + +The attached patch should be all that's needed to proper $XDG_CACHE_HOME +support, according to XDG basedir spec. + +If you folks now consider the contrib submission good enough for +inclusion, feel free to just "git am" the 3 patches. If you want me to +implement other changes --- including bureaucratic stuff like merging +patches together --- just let me know! + +Cheers. +--=20 +Stefano Zacchiroli zack@{upsilon.cc,pps.jussieu.fr,debian.org} . o . +Ma=EEtre de conf=E9rences ...... http://upsilon.cc/zack ...... . . o +Debian Project Leader ....... @zack on identi.ca ....... o o o +=AB the first rule of tautology club is the first rule of tautology club =BB + +--LZvS9be/3tNcYl/X +Content-Type: text/x-diff; charset=us-ascii +Content-Disposition: attachment; filename="0003-notmuch-mutt-XDG_CACHE_HOME-support-as-per-XDG-based.patch" +Content-Transfer-Encoding: quoted-printable + +=46rom f68f36448f5bc63211c12b9e53e9db603ed76178 Mon Sep 17 00:00:00 2001 +=46rom: Stefano Zacchiroli +Date: Mon, 26 Mar 2012 20:47:34 +0200 +Subject: [PATCH] notmuch-mutt: $XDG_CACHE_HOME support as per XDG basedir + spec + +--- + contrib/notmuch-mutt/notmuch-mutt | 4 +++- + contrib/notmuch-mutt/notmuch-mutt.rc | 4 ++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + mode change 100755 =3D> 100644 contrib/notmuch-mutt/notmuch-mutt + +diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/notmu= +ch-mutt +old mode 100755 +new mode 100644 +index 29674ec..9cd01ec +--- a/contrib/notmuch-mutt/notmuch-mutt ++++ b/contrib/notmuch-mutt/notmuch-mutt +@@ -20,7 +20,9 @@ use String::ShellQuote; + use Term::ReadLine; +=20 +=20 +-my $cache_dir =3D "$ENV{HOME}/.cache/notmuch/mutt"; ++my $xdg_cache_dir =3D "$ENV{HOME}/.cache"; ++$xdg_cache_dir =3D $ENV{XDG_CACHE_HOME} if $ENV{XDG_CACHE_HOME}; ++my $cache_dir =3D "$xdg_cache_dir/notmuch/mutt"; +=20 +=20 + # create an empty maildir (if missing) or empty an existing maildir" +diff --git a/contrib/notmuch-mutt/notmuch-mutt.rc b/contrib/notmuch-mutt/no= +tmuch-mutt.rc +index 269f03f..c0ff000 100644 +--- a/contrib/notmuch-mutt/notmuch-mutt.rc ++++ b/contrib/notmuch-mutt/notmuch-mutt.rc +@@ -1,8 +1,8 @@ + macro index \ +- "unset wait_keynotmuch-mutt --pr= +ompt search~/.cache/notmuch/mutt/results" \ ++ "unset wait_keynotmuch-mutt --pr= +ompt search`echo ${XDG_CACHE_HOME:-$HOME/.ca= +che}/notmuch/mutt/results`" \ + "notmuch: search mail" + macro index \ +- "unset wait_keynotmuch-mutt thre= +ad~/.cache/notmuch/mutt/resultsset wait_key" \ ++ "unset wait_keynotmuch-mutt thre= +ad`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notm= +uch/mutt/results`set wait_key" \ + "notmuch: reconstruct thread" + macro index \ + "unset wait_keynotmuch-mutt tag = +-inbox" \ +--=20 +1.7.9.1 + + +--LZvS9be/3tNcYl/X-- + +--gatW/ieO32f1wygP +Content-Type: application/pgp-signature; name="signature.asc" +Content-Description: Digital signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.12 (GNU/Linux) + +iQIVAwUBT3C7AJwxUDxthmOWAQjA7A/9Ebr60Dg4h6uCDYPd+cRwlQT9EwBZfxb0 +fe3oNwH61paegJ8tiPANqYnExJhxwKkcmqEIhpddvkjLRsvs0upsnrjLfJ6vho3e +E7GFAycAeZR2pcT2SUG/2dzlo9izQMzoMOWRZD5RPVC/k4G0ZoDI4BPs4x0usgtN +rS/8n4tIYGHkH1+BPsyN6R3UDBDAngB5G2xcfBH/WCjV+IomcytYypofIyeTUaR9 +VT/eYMYvCU7oLrIQK8qe/tPgag2sw3MrOb/KzXcQGjl2rQ+Q+6JRqJJac7xq01Y+ +3SCjA2I30vlcrcese8A4rL+UgRIIhESCfjSg4i6eTqvEtw8V8Twf/bEJOHqiRAu1 +8s9mQ3fhOmD679Wg76fi7tA5vFjgotg/3kAVA6TRSLNZfSyHFLaSu8rplrlD6mJ0 +LjGM+G7Dg/cZYjSzSrzs9UYKsbLS/yOlyy8ygrKlfQtVSxn6t4L7fShuP5bAuqpv +nwuykfLTqzhq3AAZCXsrmnDHgYwvL1e3s7G0ZKU9adEFv9tJ0++iO8JiTpZ6eoaW +XA+WFr5KE1mFCBjSMLT1Z6Bl/645vIjFDfJ2xZvX7P11wlnmWVKwm9r4NHvglFhB +pdvfKzvW3Z9FAIYtMY/2ISMorNaFbwkvdFxW9ndQPrkjUm03Wq/Fk5hGmyq9iLx3 +HaqPbFmMzKQ= +=8C2l +-----END PGP SIGNATURE----- + +--gatW/ieO32f1wygP--