Closed jaker-dotcom closed 2 years ago
I tried creating a new rc file though that prompt. It doesn't work either:
Config file '' does not exist, create it? [y/N]: y
io.nim(759) open
Error: unhandled exception: cannot open: [IOError]
Clean build of the program didn't help either.
Actually I am thinking that maybe I just haven't used taskopen since the release of 2.0. After all the man says that release is/was in mid 2022. If that's the case, how do I get taskopen to recognize my old notes? It says that taskopen v.1 flag "-n" is to be replaced with "--include=notes" but that does not change the output.
Could it be, that with v.2 taskopen does not recognize the NOTES_REGEX that I set in the config for taskopen v.1? I set it to "taskopen_notes". How could I tell it to recognize it?
Ok so I found it in the man taskopenrc:
notes.command = "$EDITOR $HOME/tasknotes/$UUID.txt"
The section "MIGRATION FROM TASKOPEN 1.x" implies that "-n" was just replaced by "--include=notes". Instead it should give a heads up that this functionality must be implemented via creation of an action in the taskopenrc.
This also doesn't explain why the program fails to create a config file. Should I dump my old config and start from anew? Because currently it doesn't work, still. But I see now that this is probably due to my mistakes. I post my current ~/.config/taskopen/taskopenrc the below:
[General]
EDITOR = nvim
path_ext = /usr/share/taskopen/scripts
taskbin = task
no_annotation_hook = addnote
task_attributes = priority,project,tags,description
[Actions]
notes.regex = "Notes"
notes.command = "$EDITOR $HOME/doc/tasknotes/$UUID.md"
The folder for tasknotes exists already.
Also I'd like to keep the no_annotation_hook to add a note according to NOTES_REGEX. Where is the function of no_annotation_hook = addnote
defined and is it customizable?
At first of course I am not so keen to have my workflow disrupted but I am beginning to sense the power of this rewrite already!
I found the no_annotation_hook = addnote script in the scripts folder at /usr/share/taskopen/scripts. I adopted it to use my previous NOTES_REGEX. So the current state is that the no_annotation_hook does work. But for some reason it doesn't trigger the notes action. This might be due to
@jaker-dotcom sorry for the inconvenience. I'm trying to catch up with your comments at the moment. Can you please post the output of taskopen diagnostics
?
I think it is due to the program not finding the config file and thus not the notes folder and not knowing the NOTES_REGEX. The taskopenrc is located at
/home/user/.config/taskopen/taskopenrc
, as specified inman taskopenrc
. Even specifying the file viataskopen -c /home/user/.config/taskopen/taskopenrc
does not solve the problem. It yieldsConfig file '' does not exist, create it? [y/N]:
even though the file exists!Any idea?
The nim parseopt module expects a delimiter when using short options, i.e. you must type -c=/home/user/.config/taskopen/taskopenrc
or -c:/home/user/.config/taskopen/taskopenrc
or --config /home/user/.config/taskopen/taskopenrc
Hey there! Thanks for looking into this.
Here's the output of taskopen diagnostics
Environment
Platform: Linux
Taskopen: fatal: No names found, cannot describe anything.
Taskwarrior: 2.6.2
Configuration: /home/jakob/.config/taskopenrc
Current configuration
Binaries and paths:
taskbin = task
taskargs =
editor = nvim
path_ext = /usr/share/taskopen/scripts
General:
debug = false
no_annotation_hook = addnote $ID
task_attributes = priority,project,tags,description
Action groups:
Subcommands:
default = normal
Actions:
files
.target = annotations
.regex = ^[\.\/~]+.*\.(.*)
.labelregex = .*
.command = xdg-open $FILE
.modes = batch,any,normal
-c with delim works indeed. Yet with the automatically created config the program still fails.
I wrote the comments concurring with understanding the problem. Hope they're understandable anyway. If not, please ask!
You seem to have multiple config files. The active config is /home/jakob/.config/taskopenrc
, whivh does not contain a notes action. Do you have $TASKOPENRC
set?
Closing due to inactivity. @jaker-dotcom please re-open this issue if your problem persists.
Taskopen does not open the previously created notes anymore. Instead it reads:
I think it is due to the program not finding the config file and thus not the notes folder and not knowing the NOTES_REGEX. The taskopenrc is located at
/home/user/.config/taskopen/taskopenrc
, as specified inman taskopenrc
. Even specifying the file viataskopen -c /home/user/.config/taskopen/taskopenrc
does not solve the problem. It yieldsConfig file '' does not exist, create it? [y/N]:
even though the file exists!Any idea?