inboxes can only merge to Todo because tempfiles only have Todo

master
Bel LaPointe 2023-11-09 07:50:53 -07:00
parent 89a8f61fa3
commit ca84bcbee3
2 changed files with 7 additions and 3 deletions

View File

@ -158,11 +158,12 @@ func copyTodoToDir(d string, filepaths []string) error {
if err != nil { if err != nil {
return err return err
} }
subroot, err := pttodo.NewRootFromFile(inbox) inboxRoot, err := pttodo.NewRootFromFile(inbox)
if err != nil { if err != nil {
return err return err
} }
root.MergeIn(subroot) root.MergeIn(pttodo.Root{Todo: inboxRoot.Todo})
root.MergeIn(pttodo.Root{Todo: inboxRoot.Scheduled})
if b, err := yaml.Marshal(root.Todo); err != nil { if b, err := yaml.Marshal(root.Todo); err != nil {
return err return err

View File

@ -1,5 +1,8 @@
todo: todo:
- root - root
- stub - stub
scheduled: [] scheduled:
- todo: abc
schedule: "2024-01-01"
ts: Thu Nov 9 07:49:59 MST 2023
done: [] done: []