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

Show Suggestion for Fuzzy Search #58

Closed
e-kwsm opened this issue Apr 29, 2020 · 4 comments
Closed

Show Suggestion for Fuzzy Search #58

e-kwsm opened this issue Apr 29, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@e-kwsm
Copy link
Contributor

e-kwsm commented Apr 29, 2020

At present texdoc performs fuzzy search by default, but shows nothing on it unless -D is specified, which is sometimes confusing.
Notably, if a query exactly matches a package that does not exist on a machine or that has no document, texdoc would pick different packages (#39 (comment), #56).

It would be better if texdoc shows a fuzzy search result similary to search engines like google:

$ texdoc texdac
Did you mean: "texdoc"

I don't think a flag like --fuzzy=interact is necessary since we already have -l.

Also, the default Levenshtein distance of five is a bit large⁠—siunitx and synctex are completely different (#56).

@wtsnjp
Copy link
Member

wtsnjp commented Apr 30, 2020

I will wait for comments from @kberry before deciding the direction.

but shows nothing on it unless -D is specified

Technically speaking, this is not true. A message appears with -v as well.

$ texdoc -v texdac
texdoc info: Fuzzy search result: texdoc

Notably, if a query exactly matches a package that does not exist on a machine or that has no document, texdoc would pick different packages

This can be fixed by #55 FYR.

I don't think a flag like --fuzzy=interact is necessary since we already have -l.

I have two things to add here:

  1. currently -l is nothing to do with fuzzy search
  2. even if we will add a flag, I think it is better to add a new configuration item than a command-line option (and this can be specified in command-line with the option -c)

the default Levenshtein distance of five is a bit large

Then what is your suggestion value? And why?

@wtsnjp wtsnjp changed the title [Feature Request] Show Suggestion for Fuzzy Search Show Suggestion for Fuzzy Search Apr 30, 2020
@wtsnjp wtsnjp added the enhancement New feature or request label Apr 30, 2020
@kberry
Copy link
Contributor

kberry commented Apr 30, 2020

I'm not sure I see the need for a cmdline or config file option.

Perhaps the line "texdoc info: Fuzzy search result: texdoc"
should be shown by default instead of requiring -v. (And omitted with -q of course.) That sounds useful to me. But I don't feel strongly about it.

@e-kwsm
Copy link
Contributor Author

e-kwsm commented May 14, 2020

the default Levenshtein distance of five is a bit large

Then what is your suggestion value? And why?

(Updated contents are not emailed)
I suggest two in consideration of swap: texdco vs texdoc.

@wtsnjp
Copy link
Member

wtsnjp commented May 16, 2020

Then I will take 3 to allow a swap and one more.

For the other suggestion, let us see what will happen after fixing #55.

@wtsnjp wtsnjp closed this as completed May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants