joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.24k stars 140 forks source link

describe-mode (С-h m) is not working for sly-db buffers #466

Open Valera opened 2 years ago

Valera commented 2 years ago

Hi!

I tried to examine sly-db buffer for key bindings and buffer variables, but it shows message "[sly] No button at point". Do you have any idea how to fix it?

lpaviets commented 2 years ago

I also encountered this problem a long time ago (meaning that it is not a bug introduced in a new SLY version). I know that I had investigated it, but I can't remember if I found a solution. However, I do know where the problem is - although I do not know why it is a problem: In the sly.el file, you have the definition of the sly-db-mode, using the define-derived-mode macro. The last lines of the docstring are: Full list of commands: ... \\{sly-db-frame-map}

If you comment out this bit, then there is no problem. To try this, just copy the whole mode definition e.g. in a scratch buffer, delete the last lines of the docstring, evaluate the new mode definition with this smaller docstring, and try to call describe-mode in a sly-db buffer.

A corollary of this is that you also have the error message if you try to describe the command sly-db-mode using e.g. the C-h f binding ! This clearly shows that the problem is in the docstring of the mode.

rprimus commented 2 years ago

Fri Sep 17 08:16:40 BST 2021

Good catch @lpaviets .

The problem lies with sly-db-frame-map and sly-part-button-keymap. Commenting line https://github.com/joaotavora/sly/blob/540a8c5b9a04af0a6907e07cb070f1fed8a76f48/sly.el#L5736 seems to "fix" the problem.

joaotavora commented 2 years ago

Thanks. Can someone make a pull request?

rprimus commented 2 years ago

Fri Sep 17 09:15:32 BST 2021

@Valera , @lpaviets - please test #467 to verify that if fixes the issue.

Valera commented 2 years ago

Thanks, that fixed the issue for me. C-h m no longer fails and I can see all keybindings.

yuki-tsubaki commented 1 year ago

@joaotavora I noticed that there has been a pull request for this for quite some time, but it hasn't been merged. Is there anything else that you need to be done before it can be merged?

I can confirm that removing the button based keybindings as a parent keymap seems to fix the problem for me.