godotengine / emacs-gdscript-mode

An Emacs package to get GDScript support and syntax highlighting.
GNU General Public License v3.0
316 stars 36 forks source link

Can't open local docs with C-c C-b a #115

Closed igorr0driguez closed 2 years ago

igorr0driguez commented 2 years ago

I've downloaded a copy of the official Godot Docs, stored in folder and setq gdscript-docs-local-path to that folder in user-config.

However, when trying to C-c C-b a (gdscript-docs-browse-api) I get the following message:

"Wrong number of arguments: #, 1".

Doing the same thing but going for the online docs (C-c C-b s) works very well.

Gdtoolkit is installed and everything else seems to be working fine (syntax highlighting, auto-completion, etc.). It's only with the offline docs I'm having trouble with.

NaevaTheCat commented 2 years ago

Possibly related. I get the error:

gdscript-docs-browse-api: Wrong number of arguments: (3 . 3), 1

I don't know enough elisp to know if this is exactly the same.

The error occurs evaling

(gdscript-docs-open "/path/constructed/by/gdscript-docs-browse-api")

Where gdscript-docs-browse-api has the same call here

Opening it directly with eww-open-file does the expected, so it seems like the function is called wrong?

Like I said I don't know elisp.

on emacs 28.1, archlinux 5.18.6-arch1-1

benjamin-asdf commented 2 years ago

Issue is in gdscript-docs.el

fix:

-(defun gdscript-docs-open (url &args ) +(defun gdscript-docs-open (url &rest )

&args is not elisp. It thinks url &args _ is 3 params