{"id":55,"date":"2016-11-16T16:25:50","date_gmt":"2016-11-16T16:25:50","guid":{"rendered":"http:\/\/www.hestben.se\/HestbenTechnical\/?p=55"},"modified":"2016-11-16T16:25:50","modified_gmt":"2016-11-16T16:25:50","slug":"gentoo-searching-mail-with-notmuch","status":"publish","type":"post","link":"https:\/\/www.hestben.se\/HestbenTechnical\/?p=55","title":{"rendered":"Gentoo &#8211; searching mail with notmuch"},"content":{"rendered":"<p>When setting up <code>notmuch<\/code> for use with <code>mutt<\/code> in Debian, I followed <a href=\"https:\/\/hobo.house\/2015\/09\/09\/take-control-of-your-email-with-mutt-offlineimap-notmuch\/\">this guide<\/a><br \/>\nThe macro setup there, didn&#8217;t work in the Gentoo installation, though.<br \/>\nI looked <a href=\"https:\/\/notmuchmail.org\/notmuch-mutt\/\">here<\/a> and used the macro there:<br \/>\n<code>macro index <F9> \"<enter-command>unset wait_key<enter>\\<br \/>\n<shell-escape>read -p 'notmuch query: ' x; echo \\$x >~\/.cache\/mutt_terms<enter>\\\n<limit>~i \\\"\\`notmuch search --output=messages \\$(cat ~\/.cache\/mutt_terms)\\<br \/>\n| head -n 600 | perl -le '@a=<>;chomp@a;s\/\\^id:\/\/ for@a;$,=\\\"|\\\";print@a'\\`\\\"<enter>\" \\<br \/>\n\"show only messages matching a notmuch pattern\"<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When setting up notmuch for use with mutt in Debian, I followed this guide The macro setup there, didn&#8217;t work in the Gentoo installation, though. I looked here and used the macro there: macro index &#8220;unset wait_key\\ read -p &#8216;notmuch query: &#8216; x; echo \\$x >~\/.cache\/mutt_terms\\ ~i \\&#8221;\\`notmuch search &#8211;output=messages \\$(cat ~\/.cache\/mutt_terms)\\ | head -n &hellip; <a href=\"https:\/\/www.hestben.se\/HestbenTechnical\/?p=55\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Gentoo &#8211; searching mail with notmuch&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/posts\/55"}],"collection":[{"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":2,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hestben.se\/HestbenTechnical\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}