casouri / ghelp

Emacs generic Help
43 stars 2 forks source link

ghelp-describe-variable seems to have some issues (when helpful is not required) #2

Closed terlar closed 3 years ago

terlar commented 4 years ago

If you run ghelp-describe-variable without first (require 'helpful), it breaks and you loose a lot of information from helpful-variable. If I first require it works as expected. It would be nice if ghelp would require what is used or autoload on invocation so you could have a lazy loaded helpful package.

Screenshot from 2020-11-06 09-31-29

casouri commented 4 years ago

I'm trying to fix the breakage in the basic help result. As for requiring helpful. I don't have a good idea yet, let me think about it.

casouri commented 3 years ago

Without fixing the builtin Help bug, I made ghelp to load helpful.el automatically if it is in the load-path:

(when (find-library-name "helpful")
  (require 'helpful))

(with-eval-after-load 'helpful
  (require 'ghelp-helpful)
  (ghelp-register-backend 'emacs-lisp-mode #'ghelp-helpful-backend))

Kinda dumb that I couldn't think of this earlier.

terlar commented 3 years ago

Nice, this is working, thank you for this, now I can lazy load helpful again!

terlar commented 3 years ago

I didn't notice until now that this introduced some issues when byte-compiling, I see the following:

Cannot load ghelp: (void-function find-library-name)

So I think you might need to require it:

(require 'find-func)
casouri commented 3 years ago

Thanks, didn't know that's not loaded by default. I've added the require form.

terlar commented 3 years ago

Thank you once again!