From 64866fd52521935d775471af8587dd32ed109fb9 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 27 Dec 2014 22:50:28 +0100 Subject: test3: emergency commit --- Notmuch.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Notmuch.hs') diff --git a/Notmuch.hs b/Notmuch.hs index 0d02782..528c7b4 100644 --- a/Notmuch.hs +++ b/Notmuch.hs @@ -95,6 +95,22 @@ search term = >>= return . eitherDecode' +data ReplyTo = ToAll | ToSender +instance Show ReplyTo where + show ToAll = "all" + show ToSender = "sender" + +--notmuchReply :: String -> IO (Either String [SearchResult]) +notmuchReply :: ReplyTo -> String -> IO LBS.ByteString +notmuchReply replyTo term = + notmuch + [ "reply" + , "--reply-to=" ++ show replyTo + , term + ] + -- >>= return . eitherDecode' + + putSearchResults :: [SearchResult] -> IO () putSearchResults = mapM_ (T.putStrLn . drawSearchResult) -- cgit v1.2.3