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

Update usage documentation #9

Open
TsarFox opened this issue Dec 16, 2020 · 7 comments
Open

Update usage documentation #9

TsarFox opened this issue Dec 16, 2020 · 7 comments

Comments

@TsarFox
Copy link

TsarFox commented Dec 16, 2020

With the "Rust" docset installed, (dash-docs--run-query "Rust" "String::new") errors with Wrong type argument: listp, "Rust", and (dash-docs-search "String::new") returns nil. When I edebug dash-docs-search, (dash-docs-maybe-narrow-docsets pattern) returns nil, which seems to cause the search to exit early. This seems to be because there are no open "database connections".

@rileyrg
Copy link

rileyrg commented Jan 15, 2021

I'm not getting anything back from any docset either. Did you get anywhere here?

       (use-package
         dash-docs
         ;;:custom
         ;;(dash-docs-browser-func 'eww-readable-url)
         :config
         (setq dash-docs-common-docsets '("C++" "Emacs Lisp" "Docker"))
         (setq dash-docs-docsets '("C++" "Emacs Lisp" "Docker"))
         (defun my-dash (w)
           (interactive (cons (symbol-or-region-at-point-as-string-or-prompt) nil))
           (message "docsets are: %s" dash-docs-docsets)
           (message "%s" (dash-docs-search w)))
         :bind ("C-c d" . 'my-dash))

@TsarFox
Copy link
Author

TsarFox commented Jan 17, 2021

No, sadly. I have begun writing my own Emacs interface to dasht. Perhaps I will publish the package to MELPA when it is done.

@rileyrg
Copy link

rileyrg commented Jan 17, 2021 via email

@kidd
Copy link
Member

kidd commented Jan 18, 2021

I'm not sure how you're trying to use it, but (dash-docs--run-query "Rust" "String::new") is not going to work, as the first parameter is not expected to be a string.

(dash-docs-search "String::new") will return a list with all the results for the active docsets.

The public methods are helm-dash and helm-dash-at-point (and the equivalents for ivy)

@rileyrg
Copy link

rileyrg commented Jan 18, 2021 via email

@kidd
Copy link
Member

kidd commented Jan 18, 2021

our story with the completion systems is a bit weird... we started supporting only helm, and then ivy. but there's no direct support for basic completing-read (I think).

If you want plain completing-read support, I think (dash-docs-search "String::new") is a good starting point. To narrow the docsets to only one, probably wrapping in a let, overwritting them to the docset you want. (It's been a while since I touched this code, so I might be wrong on some of what I just wrote :p )

@TsarFox
Copy link
Author

TsarFox commented Jan 27, 2021

My apologies; the two frontends to this package do indeed work. Though I believe the "Usage" section of the README should be updated accordingly. That is how I came up with the examples in my initial report.

@TsarFox TsarFox changed the title Neither dash-docs-search nor dash-docs-search-docset work as described. Update usage documentation Jan 27, 2021
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