sly
sly copied to clipboard
describe-mode (С-h m) is not working for sly-db buffers
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?
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.
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.
Thanks. Can someone make a pull request?
Fri Sep 17 09:15:32 BST 2021
@Valera , @lpaviets - please test #467 to verify that if fixes the issue.
Thanks, that fixed the issue for me. C-h m no longer fails and I can see all keybindings.
@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.