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

sentence the air is fresh produces "TheaIs fresh" #299

Closed
rntz opened this issue Dec 15, 2020 · 3 comments
Closed

sentence the air is fresh produces "TheaIs fresh" #299

rntz opened this issue Dec 15, 2020 · 3 comments

Comments

@rntz
Copy link
Collaborator

rntz commented Dec 15, 2020

Someone mentioned this in #beta today: https://talonvoice.slack.com/archives/G9YTMSZ2T/p1608050965475600. @dwiel also ran into a similar issue and mentioned it in #community.

There are really two issues here:

  1. sentence is a formatter, so it doesn't behave like say|phrase, which is unintuitive given its name. eg. Because of formatter chaining, for example, sentence the snake is here becomes "Theis_here".

  2. Formatters permit letter names in them; see the formatter_immune capture, https://github.com/knausj85/knausj_talon/blob/master/code/formatters.py#L220. Thus air in the air is fresh gets interpreted as "a" and the formatter restarts. This also means that snake quick look becomes quickl instead of quick_look.

I think we should at least fix 1. 2 has some genuine uses, but I would prefer hiding it behind a prefix so you have to say snake quick spell look to get quickl; that might be less easy to trip over.

@dwiel
Copy link
Collaborator

dwiel commented Dec 15, 2020

  1. I agree, but i rarely run into this problem
  2. This was one of the most common causes of errors until I changed in my own repos just recently. I don't really see the benefit of being able to include the alphabet in the middle of a sentence. Perhaps some people are working on code bases with goofy names like XYFoobarZbaz or something? Perhaps for variable names using Hungarian notation like fvalue to signify a floating-point value?

@knausj85
Copy link
Member

IMO this is really one of the tradeoffs of anchoring the formatter.

Without anchoring, something like
XYFoobarZbaz <-> plex yank title foobar [yada yada]

I try to remember to use the "over" variant of the formatters for such cases, which is a decent compromise.

I think fixing both is wise--at least a better default.

@knausj85
Copy link
Member

For the moment, I've removed user.letter from formatters_immune since I can't it to work on the current beta with Dragon.

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

3 participants