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

Adds TaskWikiOpen command #270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nkakouros
Copy link
Contributor

@nkakouros nkakouros commented Jun 12, 2020

This addresses #262.

@nkakouros
Copy link
Contributor Author

This PR is in a first candidate state.

I couldn't think of a way to test the two new commands, any help would be great if you think they are needed.

I also decided to add a new config option instead of parsing the taskopenrc. To parse the taskopenrc, it can be loaded as an ini file and the relevant option can be extracted. But I thought this was more convoluted.

@nkakouros nkakouros force-pushed the open branch 2 times, most recently from 1b236f1 to 81b2d19 Compare September 29, 2020 15:44
@nkakouros
Copy link
Contributor Author

I managed to add some tests for the new commands. However, I cannot think of a way to add a test that checks if TaskWikiOpen actually succeeds.

@liskin Would you happen to have some insight to share?

doc/taskwiki.txt Outdated Show resolved Hide resolved
doc/taskwiki.txt Outdated Show resolved Hide resolved
taskwiki/main.py Outdated Show resolved Hide resolved
taskwiki/main.py Outdated Show resolved Hide resolved
taskwiki/main.py Outdated Show resolved Hide resolved
@liskin
Copy link
Collaborator

liskin commented Sep 30, 2020

However, I cannot think of a way to add a test that checks if TaskWikiOpen actually succeeds.

Overriding PATH and using a dummy xdg-open that does something we can later check comes to mind.

@nkakouros
Copy link
Contributor Author

I just came up with a much better solution to the note problems. TaskWikiOpen can use sth like:

taskopen -c /path/to/config -n <task-id> -x 'echo "$FILE"'

to read the file that taskopen would open as the note. Then, it can simply edit the file in the current vim.

@sdondley
Copy link

sdondley commented Dec 2, 2021

What is the status of this?

@nkakouros
Copy link
Contributor Author

What is the status of this?

I will address the comments and make this PR more proper soon.

@tbabej
Copy link
Collaborator

tbabej commented Dec 11, 2021

For what it's worth, I think this is a worthy addition to taskwiki and I'd be happy merging this once the MR is ready.

@sdondley
Copy link

I've hacked together a solution here for using taskopen with taskwiki: #386

I've been using it about a week. Not sure if it's useful or not to your efforts but it may be worth looking at.

@nkakouros
Copy link
Contributor Author

I completely rewrote the commands, it was much more involved than expected. I removed the old tests, I need to write more. Is there any comment?

taskwiki/util.py Outdated Show resolved Hide resolved
@tbabej
Copy link
Collaborator

tbabej commented Dec 30, 2021

I completely rewrote the commands, it was much more involved than expected. I removed the old tests, I need to write more. Is there any comment?

I had a look, the PR generally looks OK. I do wish that styling changes were at least a separate commit though, looks like black auto-formatted that one file you were editing there 🙂

@nkakouros
Copy link
Contributor Author

I completely rewrote the commands, it was much more involved than expected. I removed the old tests, I need to write more. Is there any comment?

I had a look, the PR generally looks OK. I do wish that styling changes were at least a separate commit though, looks like black auto-formatted that one file you were editing there 🙂

Ooops, you are right... I will revert them back.

Co-authored-by: Tomas Babej <tomas@tbabej.com>
@sdondley
Copy link

Can I suggest adding a feature to turn this feature off (and have it on by default).

@nkakouros
Copy link
Contributor Author

Can I suggest adding a feature to turn this feature off (and have it on by default).

Do you want to keep the mappings clean? What is the use case?

@sdondley
Copy link

sdondley commented Jan 2, 2022

@nkakouros I rolled my own solution for using taskopen. I guess I could change my map.

@nkakouros
Copy link
Contributor Author

This is currently on hold until the test suite is fixed.

@jahagirdar
Copy link

This is currently on hold until the test suite is fixed.

Any ETA on this?

@nkakouros
Copy link
Contributor Author

#429 and free time are blocking this.

@sakarimov
Copy link

sakarimov commented Nov 2, 2023

i tried to apply this patch to my setup, but i got this error

taskopen is not installed
taskopen failed to open task 40
Press ENTER or type command to continue

image

even though i have installed taskopen, and it works from the terminal

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

Successfully merging this pull request may close these issues.

6 participants