summaryrefslogtreecommitdiffstats
path: root/Notmuch.hs
diff options
context:
space:
mode:
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)