benrhughes / todotxt.net

An implementation of todo.txt for Windows using the .NET framework
http://benrhughes.github.io/todotxt.net/
Other
505 stars 123 forks source link

Archiving non-functional #340

Closed mrdan closed 5 years ago

mrdan commented 7 years ago

Using version 3.3.0.0 on windows 8.

Any time I try to archive a completed item, either by hitting 'A' or using 'File-> Archive Completed Tasks', the program just displays the options window. I have an archive file set, and the file exists. The task is never archived and the selected archive file is empty. The todo.txt and todo_archive.txt files are in the same directory. The application has no problem writing to the todo.txt file.

benrhughes commented 7 years ago

Hi @mrdan, We've recently had a change to the archive behaviour (implemented by @vain0). I wonder if it has accidentally introduced a bug.

@vain0 do you have time to take a look at this issue?

Cheers,

Ben

vain0x commented 7 years ago

Hello. I will check the behavior before long. Note: The PR in question is #312 .

mrdan commented 7 years ago

I notice you have 'done.txt' hardcoded in this file. I added a 'done.txt' to the same dir as my todo.txt and archiving works now!

benrhughes commented 7 years ago

@mrdan did you have the 'auto select archive path' option set? If yes, then it expects a done.txt to exist. Perhaps what it should do, @vain0, is create a done.txt if the option is enabled but the file doesn't exist?

mrdan commented 7 years ago

Yeah, looks like that was enabled. Maybe if that option is enabled the 'Archive File'' directory select option could be changed to point to the created done.txt or disabled to indicate it won't be used?

Thanks for the help anyway!

vain0x commented 7 years ago

I see. It's unsure for users that archive file path is ignored and "done.txt" is used when auto-select is enabled, which was the introduced problem.

@mrdan wants to use todo/todo_archive pairs rather than todo/done pairs, no? If so, it may be nice if the app finds <path-to-todo>/<archive-file-name> as auto-selected archive file. (Edit: I overlooked commnts while I'm writing.)

Perhaps what it should do, @vain0, is create a done.txt if the option is enabled but the file doesn't exist?

It sounds useful, but the app should tell the user that done.txt is used. In my opinion, warning if auto-selected done.txt is missing is simple and sufficient.

mrdan commented 7 years ago

My problem was that I wasn't aware 'done.txt' was the standard expected filename. I think I ticked 'Automatically select archive path' because I thought it might cause the app to use my selected archive filename automatically in the same path as my todo.txt

I think my actions were something like:

  1. tried to archive - options popped up
  2. tried ticking 'auto select archive path' - options still popped up
  3. tried manually selecting path (still with auto select ticked) - saw that i had to create a file to select
  4. created todo_archive and set path to that - options still popped up

A warning or similar that when 'auto select archive path' is checked a 'done.txt' file is expected in the same path as todo.txt would have given me more of a hint of the problem at least