summaryrefslogtreecommitdiffstats
path: root/Notmuch.hs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-12-27 22:50:28 +0100
committertv <tv@shackspace.de>2014-12-27 22:50:28 +0100
commit64866fd52521935d775471af8587dd32ed109fb9 (patch)
treec5b9fcc3e900941e2fa21f4fde31b27d467c624f /Notmuch.hs
parentdf135474c2d4934515890aeb57d1e400f0bc488f (diff)
test3: emergency commit
Diffstat (limited to 'Notmuch.hs')
-rw-r--r--Notmuch.hs16
1 files changed, 16 insertions, 0 deletions
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)