summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/Main.hs b/app/Main.hs
index ebf94c9..f9452aa 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -307,7 +307,6 @@ main = do
docs' <-
if
| auto -> processDocuments settings probabilityCache docs
- -- TODO adding tags interactively through prompt does not persist them in store
| prompt -> processDocumentsInteractively settings probabilityCache docs
| otherwise -> pure docs
mapM_
@@ -694,8 +693,10 @@ tagDocumentInteractively settings probabilityCache doc = do
tags <- mapM (uncurry tagDocumentInteractively') suggestedTags
let doc' =
(applyTags tags doc)
- { D.index = doc.index {D.todo = False}
- }
+ & \doc' ->
+ doc'
+ { D.index = doc'.index {D.todo = False}
+ }
R.replaceDocument (printf "process %s (interactive)" doc.iFilePath) doc'
pure doc'
where
@@ -720,7 +721,7 @@ tagDocumentInteractively settings probabilityCache doc = do
pure $
if tagValue == "-"
then Left (G.tagKey tag)
- else Right tag
+ else Right (G.tag (G.tagKey tag) (Just tagValue))
ensureGit :: IO ()
ensureGit = do