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

Unofficial docsets are not loading #23

Open
agzam opened this issue Aug 25, 2023 · 1 comment
Open

Unofficial docsets are not loading #23

agzam opened this issue Aug 25, 2023 · 1 comment

Comments

@agzam
Copy link

agzam commented Aug 25, 2023

(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?

@agzam
Copy link
Author

agzam commented Aug 26, 2023

I was able to (I think at least partially) fix the issue, doing this:

(defun dash-docs-unofficial-docsets ()
  "Return a list of lists with docsets contributed by users.
The first element is the docset's name second the docset's archive url."
  (let ((user-docs (assoc-default 'docsets
                                  (dash-docs-read-json-from-url
                                   "https://kapeli.com/feeds/zzz/user_contributed/build/index.json"))))
    (mapcar (lambda (docset)
              (list
               (assoc-default 'name docset)
               (car docset)
               (assoc-default 'archive docset)))
            user-docs)))

(defun dash-docs-install-user-docset ()
  "Download an unofficial docset with specified DOCSET-NAME and move its stuff to docsets-path."
  (interactive)
  (let* ((docsets (dash-docs-unofficial-docsets))
         (docset-name (dash-docs-read-docset
                       "Install docset"
                       (mapcar 'car docsets)))
         (docset (assoc-default docset-name docsets)))
    (when (dash-docs--ensure-created-docsets-path (dash-docs-docsets-path))
      (let ((url 
             (format "https://kapeli.com/feeds/zzz/user_contributed/build/%s/%s"
                     (car docset)
                     (cadr docset))))
        (dash-docs--install-docset url (car docset))))))

But I can't make every docset to work. Maybe it's a weird issue with docset itself.

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

1 participant