inboxes can only merge to Todo because tempfiles only have Todo
parent
89a8f61fa3
commit
ca84bcbee3
|
|
@ -158,11 +158,12 @@ func copyTodoToDir(d string, filepaths []string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
subroot, err := pttodo.NewRootFromFile(inbox)
|
||||
inboxRoot, err := pttodo.NewRootFromFile(inbox)
|
||||
if err != nil {
|
||||
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 {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
todo:
|
||||
- root
|
||||
- stub
|
||||
scheduled: []
|
||||
scheduled:
|
||||
- todo: abc
|
||||
schedule: "2024-01-01"
|
||||
ts: Thu Nov 9 07:49:59 MST 2023
|
||||
done: []
|
||||
|
|
|
|||
Loading…
Reference in New Issue