Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Variable to choose if todoist is loaded automatically after creating a new task #29

Open
janfer95 opened this issue Apr 5, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@janfer95
Copy link
Contributor

janfer95 commented Apr 5, 2022

Hi, I love your todoist package and am using it on a daily basis!

As of now, after creating / updating / deleting a task, the todoist "main menu" is opened in a buffer. This is mostly useful, but sometimes I just want to quickly add a new task while working on something else and it would be much simpler if I wouldn't have to close the new buffer afterwards (I know, it's only one keyboard shortcut, but still).

So I thought that maybe it is possible to implement a variable that checks if (todoist) should be called or not.

Thank you for this package!

Edit:
Already starting to see the problem. When the todoist buffer is open it's obviously nice to reload the screen, so that we can see that the changes were actually made. Still, I think that at least for creating a new task such a variable would be nice and I wouldn't mind to have to reload the buffer manually when needed.

@abrochard
Copy link
Owner

Hi @janfer95 ,
Thank you very much for the kind words!
I think that's a really valid use case. In short, you want to be able to call todoist-new-task from anywhere but not have the last line executed which would summon the buffer?

I see two options to solve this:

  1. an extra param to todoist-new-task which would inform whether or not to summon/refresh the buffer. maybe even default to not and update parts of the code that currently call this function to ask for a refresh.
  2. create a separate function, maybe something like todoist-quick-new-task, which would share some overlap with todoist-new-task, but would be specifically made for an quick interactive call from anywhere, and probably would evolve to be more "on-the-fly" with quick success/confirmation/error handling in the status message bar.

As you may tell from the issues piling up on this repo, I'm struggling to keep up these days, but until I get there, I can provide guidance as it is in any case, a fairly simple change.

@abrochard abrochard added the good first issue Good for newcomers label Apr 7, 2022
@janfer95
Copy link
Contributor Author

Hi @abrochard,
Sorry for my late reply!

At first I was thinking about something like the first option you suggested, but I think that after some time it might get cumbersome to change this parameter every time you want to actually add a new task while being in the todoist buffer.

I really like the idea of a todoist-quick-new-task function, this would solve it elegantly.

It is indeed a fairly simple case, to make it a bit easier for you I'll open a pull request with the new (rudimentary) function added, so that you only have to do small changes, if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants