dash-docs-el / helm-dash

Browse Dash docsets inside emacs
510 stars 59 forks source link

Improve the narrowing of docsets. #73

Closed kidd closed 8 years ago

kidd commented 9 years ago

The first word of the search pattern will filter docsets. Only one word will act as a docset filter. If the first word matches all or part of a docset, this docset will be searched. the search will be done of all but the first word.

kidd commented 9 years ago

@stardiviner, This improves the situation on narrowing. It's not perfect, but I have serious doubts about a 'perfect' existing.

Any feedback is welcome

stardiviner commented 9 years ago

I applied this patch, but not work as I think. I think we should always input downcase words, like ruby on rails. But we need to separate docset name and search pattern. So we need a different separator (not space), set a variable to specify separator like ruby on rails - Flash or emacs lisp | setq etc. Then helm-dash should extract docset name and search pattern from this input.

BTW, docset name input string should search docsets with case insensitive.

What do you think about this?

kidd commented 9 years ago

I don't like having to type an special parameter to separate one from the other. Even with this meaning that some patterns will be difficult to match.

making the first word a 'maybe docset word' would make it easy and quite intuitive. the problem is if you have ruby 1.9 and ruby 2.0 , but I don't think that's very common (at least for docsets)...

agree on making matches case insensitive.

As it is now, I can type 'rails flash' and it works. and 'cloj map' and works too. 'map' looks for 'map' in all docsets. The problem would araise when looking for 'map' if you had 'mapple' docset. maybe an extra space would fix it. I don't know, but I think having to type an extra char every time is 'annoying' every time you use helm-dash. the other ones have a better amortized cost. WDYT?

btw, what's not working in that pr?