dash-docs
dash-docs copied to clipboard
Update usage documentation
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".
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))
No, sadly. I have begun writing my own Emacs interface to dasht. Perhaps I will publish the package to MELPA when it is done.
Jakob writes:
No, sadly. I have begun writing my own Emacs interface to dasht. Perhaps I will publish the package to MELPA when it is done.
that would be great. I removed the helm interface, but now can't get anything.
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)
Raimon Grau writes:
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-dashandhelm-dash-at-point(and the equivalents for ivy)
Im not using helm. I tred dash-docs-search and assumed that would integrate with minuibuffer candidate selection/filtering, Maybe I expected too much. Appreciate your reply, I'll clean it out and start afresh,
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 )
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.