-
Notifications
You must be signed in to change notification settings - Fork 59
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
Narrowing down to one specific docset does not work? #192
Comments
I modified (defun helm-dash--build-source (docset)
"Build a Helm source for DOCSET."
(lexical-let ((docset docset))
(helm-build-sync-source (car docset)
:action-transformer #'helm-dash-actions
:candidates (lambda ()
(when (and (> (length helm-pattern) 0) (equal (substring helm-pattern 0 1) ":"))
(when (string-prefix-p
(concat (downcase (car docset)) " ")
(downcase (substring helm-pattern 1)))
(setq helm-pattern (string-join (cdr (split-string helm-pattern " " t)) " "))
))
(cl-loop for row in (helm-dash--run-query docset helm-pattern)
collect (helm-dash--candidate docset row))
)
:volatile t
:persistent-help "View doc"
:requires-pattern helm-dash-min-length))) |
Thanks for the report! Just tried it and indeed it looks we're filtering too early. No time now to dig deeper when we got this regression, but it is a valid bug. I like the |
Narrowing down in counsel-dash does not work too here. IMO The problem is in the following funtion: (defun dash-docs-search (pattern)
"Given a string PATTERN, query docsets and retrieve result."
(when (>= (length pattern) dash-docs-min-length)
(cl-loop for docset in (dash-docs-maybe-narrow-docsets pattern)
appending (dash-docs-search-docset docset pattern)))) ;; PROBLEM the problem is it does not delete the docset name from the |
Hi, sorry I'm just looking at this issue. I think what is happening here is the filtering does technically work, but only within the context of the docsets contained in the
In this case I can type 'Akka ' and it'll correctly limit the search results to akka specific entries. However, if I were to prefix the search with 'Rust ' I would not be able to search within the rust docset since I've not configured that docset for my current buffer. I personally don't think this behavior should change, but instead perhaps having an alternative doc search function that ignores the Also, please let me know if I'm not understanding your problem correctly. |
Yes, you're right. Filtering in So sorry for the incorrect report and thanks again. |
Thanks firstly. This package is great and makes looking for document convenient.
But narrowing down to a specific docset does not work for me.
I have the same questions as in #180 . It seems that helm-dash filters docsets too early.
I installed helm-dash(version 20190527.1118) from melpa and I'm using emacs 27 compiled from source.
The text was updated successfully, but these errors were encountered: