From f38b89b69fd823d867431c70750ddd8ad0655a2c Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Sat, 22 Jan 2011 15:07:48 +0100 Subject: [PATCH] org-mode - mutt integration: port to maildir-utils >= 0.7 --- .../posts/2010/02/integrating_Mutt_with_Org-mode.mdwn | 7 ++++++- .../2010/02/integrating_Mutt_with_Org-mode/mutt-open | 11 ++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/blog/posts/2010/02/integrating_Mutt_with_Org-mode.mdwn b/blog/posts/2010/02/integrating_Mutt_with_Org-mode.mdwn index 5b81183a..3b6f6b4a 100644 --- a/blog/posts/2010/02/integrating_Mutt_with_Org-mode.mdwn +++ b/blog/posts/2010/02/integrating_Mutt_with_Org-mode.mdwn @@ -91,7 +91,7 @@ nicely integrates with Mutt; check out [[my previous blog post on the subject|2009/10/mail_indexing_for_mutt/]] for a sample setup. Using mu, `Message-ID` lookups are as simple as: - zack@usha:~$ mu find -f p m:E1NbJad-0007x9-B7@ries.debian.org + zack@usha:~$ mu find -f l i:E1NbJad-0007x9-B7@ries.debian.org /home/zack/Maildir/Debian.project/cur/1264883664_0.9472.usha,U=6320,FMD5=2284e927bb93d8a2ec434f5614dc04ba:2,S Note: I'm relying upon *maildir-utils version 0.6* or greater, for all @@ -130,4 +130,9 @@ Summary of scripts and configuration snippets discussed above: * [[Emacs configuration|emacs-conf]] * [[Mutt configuration|mutt-conf]] + +**Update:** fix [[mutt-open]] to work with maildir-utils, version 7 or above +(22/01/2011, at +[org-camp](http://www.lifehacking.fr/mediawiki/index.php/OrgModeCampJanvier2011)) + [[!tag lang/english planet-debian orgmode mutt gtd hack]] diff --git a/blog/posts/2010/02/integrating_Mutt_with_Org-mode/mutt-open b/blog/posts/2010/02/integrating_Mutt_with_Org-mode/mutt-open index 9bf96590..368a3844 100644 --- a/blog/posts/2010/02/integrating_Mutt_with_Org-mode/mutt-open +++ b/blog/posts/2010/02/integrating_Mutt_with_Org-mode/mutt-open @@ -4,29 +4,30 @@ # Mail can be specified either by path or by Messsage-ID; in the latter case # file lookup is performed using some mail indexing tool. # -# Copyright: © 2009-2010 Stefano Zacchiroli +# Copyright: © 2009-2011 Stefano Zacchiroli # License: GNU General Public License (GPL), version 3 or above -# requires maildir-utils >= 0.6 +# requires maildir-utils >= 0.7 MUTT=mutt MUTT_FLAGS="-R" HIDE_SIDEBAR_CMD="B" # set to empty string if sidebar is not used -# Sample output of 'mu find -f p m:MESSAGE-ID', which gets passed to mutt-open +# Sample output of 'mu find -f l i:MESSAGE-ID', which gets passed to mutt-open # /home/zack/Maildir/INBOX/cur/1256673179_0.8700.usha,U=37420,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S die_usage () { echo "Usage: mutt-open FILE" 1>&2 echo " mutt-open MESSAGE-ID" 1>&2 - echo 'E.g.: mutt-open `mu find -f p m:MESSAGE-ID`' 1>&2 + echo 'E.g.: mutt-open `mu find -f l i:MESSAGE-ID`' 1>&2 echo ' mutt-open 20091030112543.GA4230@usha.takhisis.invalid' 1>&2 exit 3 } # Lookup: Message-ID -> mail path. Store results in global $fname lookup_msgid () { - fname=$(mu find -f p m:"$1" | head -n 1) + #fname=$(mu find -f p m:"$1" | head -n 1) + fname=$(mu find -f l i:"$1" | head -n 1) } dump_info () { -- 2.20.1