diff options
author | tv <tv@shackspace.de> | 2015-01-31 15:51:57 +0100 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-01-31 15:51:57 +0100 |
commit | ef48d081dfd0e817c4959dbbd49929ae760a310e (patch) | |
tree | 54867be238b6f8707a43fa7af6d16d3f59144f73 /Notmuch.hs | |
parent | 39e76d0c83515a98f84f06b1c3b430d1e67cd1cd (diff) |
Notmuch: replace {un,}setTag by notmuchTag
Diffstat (limited to 'Notmuch.hs')
-rw-r--r-- | Notmuch.hs | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -10,11 +10,13 @@ import Control.Exception import Data.Aeson import Data.Monoid import Data.Tree +import Notmuch.Class import Notmuch.Message import Notmuch.SearchResult import System.Exit import System.IO import System.Process +import TagUtils -- | Fork a thread while doing something else, but kill it if there's an @@ -177,11 +179,6 @@ notmuchShowPart term partId = do _ -> Left $ show exitCode <> ": " <> LBS8.unpack err -setTag :: String -> String -> IO LBS.ByteString -setTag tag i = do - notmuch [ "tag", "+" <> tag , i ] - - -unsetTag :: String -> String -> IO LBS.ByteString -unsetTag tag i = do - notmuch [ "tag", "-" <> tag , i ] +notmuchTag :: HasNotmuchId a => [TagOp] -> a -> IO () +notmuchTag tagOps x = + notmuch ("tag" : tagOpsToArgs tagOps ++ [notmuchId x]) >> return () |