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

Can never complete this page #9

Open
uzimonkey opened this issue Oct 20, 2017 · 6 comments
Open

Can never complete this page #9

uzimonkey opened this issue Oct 20, 2017 · 6 comments

Comments

@uzimonkey
Copy link

I was given the following page, but it was incorrect in two ways:

  • Occasionally pressing enter at the end of a line would skip the first letter of the next line. The letter would be green, and correct keypressed would continue to green letters as normal.
  • The page never ends, even after you've typed all available characters.

vcxsrv_2017-10-20_11-45-12

@ghost
Copy link

ghost commented Oct 27, 2017

Oh wow ... i am having the same problem for when doing the speed-type-region test over a marked region. I just looked at the code and think i've made a "personal" fix for this issue, my fix would basically exit the test (and show statistics) when you've gone pass the end of "file" or rather end of "buffer". Here's my patch:

speed-type-patch.txt

@uzimonkey Maybe it will help :)

@parkouss Hi man .. awesome package!! Please have a look at my patch, could u run it through all ur test suites? (Sorry man, not sure what ur work procedure is with git etc...) ... let me know what u think.

@parkouss
Copy link
Collaborator

@babalusobral thanks for investigating this! So looking at your patch, it seems that the end of the typed text (= speed-type-remaing 0) is sometimes wrong. I can not reproduce the issue though, unless I am jumping through some place in the buffer without editing (like for example using C-n). In this case, indeed the exercice never complete - and it does with your fix (but still I have to go one character after the last one).

But in that case, shown statistics at the end seems wrong, and it should be reported I think that some characters were not even typed.

Do you think it is the same cause for you (in some way you are jumping to other caracter) or is it something else? If the latter, could you explain me how I can reproduce it (the exact text selected, anything that I would need to be able to reproduce it).

thanks again.

@ghost
Copy link

ghost commented Oct 31, 2017

@parkouss I haven't had too much runtime with this package I must say .. the only functionality i used was the speed-type-region, I used it on some lisp code area just to practice typing code faster, especially practicing hitting the brackets, but just like u are saying it above, the problem i had was that if I pressed C-n / C-p or moved using the arrow keys then I would not be able to finish the test.

It is good someone is testing this and is paying attention 👍 ;)
Yeah it is true the statistics is off, I completely forgot about it hehe, I agree it should display correct information upon exit. I will check it .. in due time :).

Another feature might be to prompt the user in the minibuffer if they really want to stop the speed type test, because someone might unintentionally hit the <ENTER> button on the last line, and right now it will forcefully exit.

Another issue i have found (maybe minor) is that if u press enter when u have reached the end of a line and then the marker moves to the next line to the beginning of the line and if u have at that line code that has been indented by some spaces and u hit the <TAB> key as a natural reflex then alot more text gets marked green as a result, but i would have rather thought that the marker should've been moved to the beginning of the first character instead, i.e. try this example:

(defun speed-type--change (start end length)
  "Handle buffer changes.

Once u get to the end of the line, i.e. after ')' hit <ENTER> then on the next line hit <TAB>, in my case the text "Hand" has been marked green and the marker is pointing to the next character "l" in the word "Handle".

@ghost
Copy link

ghost commented Oct 31, 2017

@parkouss Here comes another patch ... mind u though, there's alot of debug print messages in there for debugging purposes (if u have better ways of debugging please do let me know how, preferably something like gdb). Anyways, let me know what u think.

speed-type-patch-2.txt

Accuracy will always show 0.00% because of line 208 where entries are lesser than errors:

(speed-type--accuracy entries (- entries errors) corrections)

@j0ni
Copy link

j0ni commented Dec 5, 2021

I often find this happens, and I have no way to complete the example. I think it happens for me when I move around to correct mistakes I missed earlier.

I would like a command to end the example please, instead of broken automation.

However, it looks like this project is abandoned, so I will open another ticket to see if that's the case.

dakra added a commit that referenced this issue Aug 15, 2022
@dakra
Copy link
Owner

dakra commented Aug 15, 2022

I also managed to get into this state but can't really figure out the exact steps it takes for it to happen.

As a workaround I just made speed-type-complete interactive an bound it to C-c C-k.
So next time you're "stuck", at least you can call M-x speed-type-complete or just press C-c C-k.
Hope that helps a little bit.

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

No branches or pull requests

4 participants