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

Looking for documentation via context menu after setting *hyperspec-local-path* to NIL crashes Corman Lisp IDE #32

Closed
arbv opened this issue Apr 20, 2018 · 2 comments
Assignees
Labels

Comments

@arbv
Copy link
Member

arbv commented Apr 20, 2018

As far as I can tell, it should try to show online documentation instead of local one (see *hyperspec-internet-path*).

How to reproduce:

(setq ccl::*hyperspec-internet-path* "http://www.lispworks.com/documentation/HyperSpec/") ; 'http://' is important here, as dicovered by Luis-Cervantes
(setq ccl::*hyperspec-local-path* nil)
@arbv arbv added the bug label Apr 20, 2018
@Luis-Cervantes
Copy link
Collaborator

Hi Artem, hope you are well,

I hadn't noticed this bug as I’m using my own Lisp programed Corman Lisp IDE which uses whatever browser is set as the default browser for htm files and not only the MS IE browser as is the case for the C programed Corman IDE. By looking at the documentation.lisp, hyperspec.lisp and misc-features.lisp files I found another bug which I will comment below.

This particular problem can be solved by setting the internet path, for example, to:
(setq ccl::hyperspec-internet-path "www.lispworks.com/documentation/HyperSpec/")
Notice that "http://" is not present in the string for IE.

On the more broader subject:
1.- The file hyperspec.lisp gets loaded every time a cl symbol is searched for its documentation. This is because the file misc-features.lisp is loaded and sets (defvar ccl::hyperspec-loaded nil) but then (defvar hyperspec-loaded t) in hyperspec.lisp has no effect. We could instead use defparameter or setq in the latter.

2.- If we are to follow the standard, the documentation function should be redefined as a generic-function with two specializing arguments, which accept non-symbol objects and can be extended to accept :hyperspec as a doc-type.

3.-As I mentioned above, we should let the user choose the browser by shellexecute on the .htm type URI which uses the user’s default browser. The present code represents a nice programmer’s example on how to embed the IE browser in an application but it’s just a browser and is not really adding any lisp functionality to it.

Do you agree?

@arbv
Copy link
Member Author

arbv commented May 20, 2018

@Luis-Cervantes

Hello, Luis,

I am OK. As you might have noticed, I have developed a new installer for Corman Lisp recently. I think that the next release should have a proper installer instead of being distributed in a ZIP archive.

Firstly, thank you for taking your time to investigate the issue.

Now let's return to your suggestions:

1.- The file hyperspec.lisp gets loaded every time a cl symbol is searched for its documentation. This is because the file misc-features.lisp is loaded and sets (defvar ccl::hyperspec-loaded nil) but then (defvar hyperspec-loaded t) in hyperspec.lisp has no effect. We could instead use defparameter or setq in the latter.

I have just fixed this in master branch. That's a good catch. I updated HyperSpec to the version 7.0 by the way.

2.- If we are to follow the standard, the documentation function should be redefined as a generic-function with two specializing arguments, which accept non-symbol objects and can be extended to accept :hyperspec as a doc-type.

Well, that is one of the many issues which make Corman Lisp not fully standard compliant.

I created a new issue as a reminder (issue #33).

3.-As I mentioned above, we should let the user choose the browser by shellexecute on the .htm type URI which uses the user’s default browser. The present code represents a nice programmer’s example on how to embed the IE browser in an application but it’s just a browser and is not really adding any lisp functionality to it.

I believe that the best solution here would be to add an IDE configuration option to allow user to run an external browser instead of a child window with embedded IE as there might be some users which prefer to look up for the documentation in the IDE's child window (me included, I even have Emacs configured to use EWW).

Again, I created a new issue as a reminder (issue #34).

I believe it would be better to reopen the issue as, even when not properly configured, Corman Lisp should not crash on documentation lookups. We should understand the reason why it crashed before closing this bug.

@arbv arbv reopened this May 20, 2018
@arbv arbv self-assigned this May 22, 2018
arbv added a commit that referenced this issue Jul 23, 2018
@arbv arbv closed this as completed Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants