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

Use docsets from Zeal #140

Closed
sanklamm opened this issue Aug 30, 2016 · 17 comments
Closed

Use docsets from Zeal #140

sanklamm opened this issue Aug 30, 2016 · 17 comments

Comments

@sanklamm
Copy link

Since I am on Windows, I have to use Zeal as my document browser. Zeal creates a subfolder /Doc where all docsets live in. Like so:
"../Zeal/Doc/Python_3.docset"
I understand that these are the same as in dash?
Is there a way to use these docsets with helm-dash? I already tried:
(setq helm-dash-docsets-path "C:/Users/my.name/Apps/ZealPortable/Doc/")

@kidd
Copy link
Member

kidd commented Aug 30, 2016

Changing helm-dash-docsets-path should work. not sure what is the correct path, but it should be definately possible.

Btw, you don't need zeal. helm-dash uses sqlite3 (that one you do need) to directly search in the docsets.

@sanklamm
Copy link
Author

I will try again tomorrow.
Is it true that if the helm-dash-docset-path is correctly set that I would see a list of all docsets when I call helm-dash-docset-activate (I don't have the correct function in front of me)?

Is it enough to set the PATH of sqlite in my emacs config or does it need to be set in Windows?

@sanklamm
Copy link
Author

I changed helm-dash-docsets-path with
(setq helm-dash-docsets-path "C:/Users/my.name/AppData/Roaming/.emacs.d/docsets")
I checked if the path was right with
(directory-files "C:/Users/my.name/AppData/Roaming/.emacs.d/docsets")
which listed the *.docset files. But when I used
helm-dash-activate-docset
the list was empty. What am I doing wrong? I also have sqlite3 in my PATH.

@kidd
Copy link
Member

kidd commented Aug 31, 2016

Hi,
you should (helm-dash-activate-docset "Python_3") or "Python 3", depends on the name of the directory.

then, (helm-dash) should open helm-dash with the python docset.

some errors write info in some helm-dash-errors buffer. maybe it has useful info.

@sanklamm
Copy link
Author

That just returns nil.

@kidd
Copy link
Member

kidd commented Aug 31, 2016

just returns nil? It should at least open the dash interface.

if you have some elisp-fu, try toggle-debug-on-errors, or tracing some functions (I have no windows to try)

@sanklamm
Copy link
Author

you mean the app Dash? I don't have that since I am on Windows. That's why I used Zeal, which fetches the same docsets. I am trying to access those.

@kidd
Copy link
Member

kidd commented Aug 31, 2016

sorry, I ment the helm interface

@sanklamm
Copy link
Author

yes. it opens the empty helm interface. I guess this would list all docsets in the specified folder. A search for an existing docset ("Python_3" or "Bash") returns "no match".

@kidd
Copy link
Member

kidd commented Aug 31, 2016

it doesn't list all docsets in the folder. you have to 'activate' them, putting them in helm-dash-active-docsets list.

Then they should be searched when searching for a term. I don't know what should be the output of looking for 'bash'. try looking for 'print' or 'echo'. also, trace-functions.

@sanklamm
Copy link
Author

ok. At least I got helm-dash to find the docsets now. But it isn't able to load the docs. I think either the docsets generated by Dash on the Mac are different than the ones on Windows or the way you deep-link to a specific section in a html file is different on both systems. I hereby declare this experiment as failed.

@sanklamm
Copy link
Author

Tomorrow I'll transfer a few docsets from my Mac to the Windows machine and check again.

@sanklamm
Copy link
Author

Right. I got it (partly) to work. If helm-dash uses an external browser, it can open the docs. But I want to use eww (thats why I picked helm-dash over zeal-at-point in the first place).
Sadly eww is not able to resolve local file URLs. It opens a ftp connection and thinks "c:" in the path c:/User/... is a host.
Don't know, is that your business how you pipe URLs to eww or is that eww's fault?

Thanks for your time.

@kidd
Copy link
Member

kidd commented Aug 31, 2016

the docsets are exactly the same. they are tgz files (which helm-dash can also download without zeal/dash).

Good luck with your next experiments. keep us informed

@kidd
Copy link
Member

kidd commented Aug 31, 2016

eww has some issues (in mac at least, see helm-dash readme).

so, it's either windows' , or your config (maybe you have to escape c:\ somehow), or eww's .

zeal-at-point and helm-dash approaches are quite different. Use what works best for you.

@sanklamm
Copy link
Author

Yes, I know. Do you - by any chance - know of someone who got helm-dash to work on windows? With opening the docs inside emacs that is?

@sanklamm
Copy link
Author

sanklamm commented Sep 1, 2016

It seems w3n is the way to go instead of eww. w3n is able to resolve the URLs properly. But getting w3n to work on Windows involves a couple of extra steps. Especially with spacemacs as there is no w3n layer available.
But it works now and I'm happy with it. Thanks again for your time.

@sanklamm sanklamm closed this as completed Sep 1, 2016
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

2 participants