metalelf0 / pomodori-todo.txt

A pomodoro counter implementation for todo.txt.
25 stars 8 forks source link

can't plan pomodoros #7

Open anghene opened 7 years ago

anghene commented 7 years ago

use case:

$ t pom ls 
1 make pancakes (#pomo: 0/0)
$ t pom plan 1 4
1 make pancakes (#pomo: 0/4)
$ t pom add 1 
1 make pancakes (#pomo: **1/0)**
$ t pom ls
1 make pancakes (#pomo: 0/0)

It seems to me that somewhere it leaks memory. I have my TODO_DIR AND TODO_ACTIONS_DIR setup in the same directory at ~/.todo on Linux. Everything works fine except plan pomodori functionality.

EDIT: I made an alias t=~\.todo\todo.sh and whenever I use t pom ls it reads from a different .txt file

When I used todo.sh instead of the alias, it persisted the ...pom plan command

anghene commented 7 years ago

After a little investigation, I realised todo.sh pom plan 1 4 actually modifies the file ~\bin\todo.txt and not $\TODO_DIR\todo.txt (which in my case is at ~.todo). It's only there that the symlinked command todo.sh creates .txt files and writes them, displaying correctly when using todo.sh pom ls but not when using t pom ls

matthijsvk commented 4 years ago

I also have the issue that planning isn't persistent. I have TODO_DIR=$HOME/.todo and TODO_ACTIONS_DIR=$HOME/.todo/todo.actions.d.

What did you do to solve this?

whenever I use t pom ls it reads from a different .txt file

which .txt file do you mean?

matthijsvk commented 4 years ago

In any case, I solved as follows: In pomodori-todo/pom, I added a line:

TODO_EXC="#{ENV['HOME']}/bin/todo.sh"

and changed all instances of 'todo.sh' to #{TODO_EXC}. I think this was the essential fix.

For completeness, I also removed the aliases I had (todo.sh=$HOME/bin/todo/todo.sh). Instead, I added a script in $HOME/bin/todo.sh:

#!/bin/bash
$HOME/bin/todo.sh -d $HOME/.todo/todo.cfg "$@"

and added an alias t="$HOME/bin/todo.sh".