dash-docs-el / dash-docs Goto Github PK
View Code? Open in Web Editor NEWA elisp library that exposes functionality to work with and search dash docsets.
License: GNU General Public License v3.0
A elisp library that exposes functionality to work with and search dash docsets.
License: GNU General Public License v3.0
On macOS Dash.app, the default main docsets are downloaded in "/Users/stardiviner/Library/Application Support/Dash/DocSets"
. But Dash.app also downloaded third-part docsets in other locations:
Cheat Sheets Data GitHub Stack Overflow library.dash
Clojure DocSets DocSets License User Contributed
Can dash-docs.el make variable dash-docs-docsets-path
to be a list of paths for search docsets?
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 used the counsel-dash-install-docset
with I understand is just an alias to dash-docs-install-docset
to install Emacs_Lisp
and it does fail with the following error:
Contacting host: api.github.com:443
Contacting host: raw.github.com:443
Wrote /tmp/Emacs_Lisp-feed.xml
Wrote /tmp/Emacs_Lisp-docset.tgz
dash-docs-extract-and-get-folder: Search failed: "too long"
I checked and it does download the docset, but then it never installs it. Do you know what might go wrong? I use the following configuration:
(use-package counsel-dash
:commands counsel-dash counsel-dash-install-docset
:hook
(emacs-lisp-mode-hook . (lambda () (setq-local counsel-dash-docsets '("Emacs Lisp"))))
:custom
(counsel-dash-docsets-path "~/.config/dash-docset"))
EDIT: the same happens when I try to install the downloaded tgz using counsel-dash-install-docset-from-file
.
I've been using dash for a while and I want to import the docsets that I do have over to dash-docs.el is there a way to do so?
Hey @gilbertw1, I created this very simple logo of dash-docs-el. Wanted to add it to the org, but I don't have the rights to change it.
Could you add it? or give the the permissions and I'll do it when I have a minute.
Thanks!
Context: Gentoo, Emacs 28.3, dash-docs-20210830.926, sqlite3 version 3.41.2 2023-03-22
dash-docs-search
fails with the error cannot open "''"
unless the dash-docs-sql
function is modified such that the line:
"-list" "-init" "''" db-path sql)
is replaced by
"-list" db-path sql)
It seems for some docset, like Python_3
, the install path is <docsets-path>/Python 3
where the underscore has been replaced by a space, is this the case for all docsets ? I look at the json and XML but there's does not seem to be any mapping between the XML file name we use for the docset name and the extracted path. Maybe we should replace the _
from the docset name ?
Keep running into this whenever I try to run a query via
Example:
----------------
HEY! This is dash-docs (sqlite) error logging. If you want to disable it, set `dash-docs-enable-debugging` to nil
----------------
Error: in prepare, near "/": syntax error
/Users/gopar/Library/Application Support/Dash/DocSets/Python_2/Python 2.docset
^--- error here
Error: in prepare, near "/": syntax error
/Users/gopar/Library/Application Support/Dash/DocSets/Flask/Flask.docset/Conte
^--- error here
Any ideas? Thanks!
As in #1
dash-docs-docsets-path
, helm-dash-docsets-path
, helm-dash-docset-newpath
all set to ~/.docsets
I did a couple quick runs through dash-docs-extract-and-get-folder
, but then I'm not sure what to look for.
when url-user-agent
is nil, dash-docs-install-docset gives the error:
dash-docs-read-json-from-url: JSON readtable error: 82
As github is returning 403 forbidden for requests that don't contain a user agent. Maybe in dash-docs-read-json-from-url
we could locally set url-user-agent
to 'default if it's nil. Or else return a more descriptive error message it fails to get the url with 403 forbidden rather than a json parse error.
Any plans to add the package to melpa stable?
The README says it's possible to install from stable but it isn't? There is not release/tags yet (looks like copy/pasted from helm-dash)
It's available on MELPA.
Now, it's possible to choose between install the stable or development version of dash-docs. Here there is an explanation about stable packages and MELPA and here a list of our tags.
m-x package-install dash-docs RET
Also, thanks for allowing using dash without pulling the helm dependencies!
It would be very convenient if dash-docs supported stronger search engines, such as ugrep --bool
(a kind of regex with space acting as AND
), or fzf --filter
. The current search requires typing things very precisely.
I recently upgraded Emacs to version 26.2 and dash-docs stopped working. In particular dash-docs-search
always returns nil
.
I have tried adding a .mode list
line to ~/.sqliterc
as well as removing this file altogether. Any ideas?
After installing docsets some temporary files are created outside temporary -file-directory
, using the name of the directory as a prefix. There is a missing / in the process of how the files are created.
Dash-docs doesn't work correctly on Windows, most likely due to how external commands are handled and syntax. When looking up a symbol with helm-dash for example, dash-docs will correctly find the docset that includes that symbol, but clicking enter will open a dash-docs-errors buffer with
----------------
HEY! This is dash-docs (sqlite) error logging. If you want to disable it, set `dash-docs-enable-debugging` to nil
----------------
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
cannot open: "''"
(There is a ^L
between every line)
And the message helm-M-x-execute-command: ShellExecute failed: The system cannot find the file specified.
I've made sure I'm using windows-version of sqlite3.
I'm assuming it's related to call-process in
(defun dash-docs-sql (db-path sql)
"Run in the db located at DB-PATH the SQL command and parse the results.
If there are errors, print them in `dash-docs-debugging-buffer'"
(dash-docs-parse-sql-results
(with-output-to-string
(let ((error-file (when dash-docs-enable-debugging
(make-temp-file "dash-docs-errors-file"))))
(call-process "sqlite3" nil (list standard-output error-file) nil
;; args for sqlite3:
"-list" "-init" "''" db-path sql)
...
(dash-docs-unofficial-docsets)
points to the broken url
"https://dashes-to-dashes.herokuapp.com/docsets/contrib"
Maybe better to try to load them from https://github.com/Kapeli/Dash-User-Contributions?
I've only recently started using Dash, so I don't know if this is something new or not, but I've noticed several docsets that have compressed content. For example, if you explore the Python 3
docset, you find this in the Contents/Resources
directory:
-rw-r--r-- 1 ndw staff 3.7M Apr 18 07:06 docSet.dsidx
-rw-r--r-- 1 ndw staff 32K Apr 18 07:06 docSet.dsidx-shm
-rw-r--r-- 1 ndw staff 3.7M Apr 18 07:06 docSet.dsidx-wal
-rw-r--r-- 1 ndw staff 14M Apr 18 07:06 tarix.tgz
-rw-r--r-- 1 ndw staff 212K Feb 27 09:40 tarixIndex.db
Unsurprisingly, perhaps, dash-docs
doesn't appear to be able to use those.
On a more positive note, dash-docs
on MacOS with Emacs 27 seems to work just fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.