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

Integrating features from typer-mode into speed-type #37

Open
lordnik22 opened this issue Dec 5, 2022 · 3 comments
Open

Integrating features from typer-mode into speed-type #37

lordnik22 opened this issue Dec 5, 2022 · 3 comments

Comments

@lordnik22
Copy link

Hi there

I recently opened a PR at melpa to add the repo: https://github.com/lordnik22/typer-mode

typer-mode is an old snipped I once found on emacswiki which I now thought I could maintain. It's also meant to train typing speed and accuracy. So it's similar to speed-type.

The two main differences are:

  • words are arranged in random order
  • when making an error, a new line is added

I now want to integrate these two feature with two additions to speed-type:

  • adding an custom parameter (speed-type-add-extra-line-on-mistake, either t or nil, default: nil) which adds "extra-line" when non-nil for each speed-type-setup. I planned to check this new custom parameter in speed-type--diff.
  • new speed-type-setup: speed-type-random which arranges the words randomly from the content-source (gutenberg, buffer)

Existing functionality wouldn't change when not explicitly making changes to the custom variable.

  • What do you think, would this two features fit in to this package?
  • Any advice or tips :)?

Best regards
lordnik22

@dakra
Copy link
Owner

dakra commented Dec 5, 2022

Hi!

Thanks for posting.

Did you see the speed-type-top-x/100/1000 commands? These show random top X (or top 100, 1000) words for each language.
So I think this functionality is there.

I don't mind adding a feature that adds a new line (or maybe just a new word?) when you make a typo.
Personally I think I would get annoyed by it but maybe I just have to try it first :D
But if it's customizable I don't think there's any harm in adding it as I think it will not add much code.

I'm happy to help more or give some tips if you need any.

@lordnik22
Copy link
Author

Hi

Yes, I saw the speed-type-top-x commands. I run into this because speed-type-buffer prepares the buffer content differently than typer-mode. I would like to use a speed-type-command which takes the text from my org-buffer. This worked but I ended up typing org-tables by hand :D. This is why I though a new setup command which prepares the text a bit differently (more like typer-mode) would be nice.

I'm working on the line-adding on the fork: https://github.com/lordnik22/speed-type

I like the idea just adding words instead of whole lines. I therefore made a custom variable speed-type-add-extra-words-on-mistake with which you can specify how many words should be added on each mistake.

Setting the variable: speed-type-add-extra-words-on-mistake to a number greater than 0 and calling M-x speed-type-top-100 inserts "asdf" on each mistake. So the concept more or less works, but I had to hack some things: remove hooks and adding them again, adjust variables: speed-type--mod-str, speed-type--original-content.

The biggest problem I currently facing is that there isn't a "content-buffer" from which the typing-session takes his text from. The text is prepared in the setup-method and afterwards discarded. What do you think about the idea of an general "speed-type-content-buffer<#> for each speed-type session. This content buffer would be killed as soon as the user stops his typing-session (kills the speed-type-buffer). This content-buffer could be usefull in an concrete add-extra-word-content-fn which I supply to the setup-method.

Would be glad about your thoughts!

@dakra
Copy link
Owner

dakra commented Dec 6, 2022

This worked but I ended up typing org-tables by hand

there is also speed-type-replace-strings but I guess you saw it and isn't enough.

I'm working on the line-adding on the fork: https://github.com/lordnik22/speed-type

feel free to create a draft/WIP PR, then it's easier to talk about concrete changes.

What do you think about the idea of an general "speed-type-content-buffer<#> for each speed-type session

For the random words I don't think it's needed, but for the books (or buffer text) I would
even like this. Then, after you finished a session, instead of pressing (n)ext and getting a complete new book/text
maybe we can add an option to simply continue where you left off.

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

2 participants