-
Notifications
You must be signed in to change notification settings - Fork 809
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
Cannot change shortcut for code_prettify #979
Comments
Yes. Reproductible with notebook 5.0. This is super strange: actually changing the shortcut for process_all changes the shortcut for process_cell. Even more strange, this is also true if I change shortcuts in autopep8 or even in nbTranslate. In all cases, the modified shortcut is the one for |
That does sound very strange. However, I'd be surprised if it's coming from the configurator, as that just sets config values by text-string names as declared in the yaml files, which seem to be correct. I think more likely is that this is a result of the library factory-method for producing the nbextensions, resulting in the same object being used for something across all of them, which it shouldn't be |
in fact, I'm fairly sure it's a result of the lines code_prettify/kernel_exec_on_cell.js#L44-L50, where we attempt to keep the same object for the default config, so that nbextensions can alter it, resulting in the same |
actually, I'll revise my previous statement, and say that although that was a problem, there may be more than one bug at work here 😜 |
Ok, it seems to work ok for me on 5.0.0 with the fix in jfbercher/code_prettify#8. However, there's also a bug in the configurator which may be related. Essentially, rebuilding the controls to edit keyboard shortcuts doesn't work correctly, so that if you at any point refresh the list of configurable nbextensions, or reset any nbextensions parameters to their default values using the reset button, any subsequent edits to keyboard shortcuts don't get applied. You can see this in the sense that the displayed shortcut in the parameters list doesn't change, but it isn't super obvious. Im not yet sure what the reason for this is, but will have a look... |
I am trying to customise the shortcut for extension
code_prettify
I can change it for prettifying a cell. But when I try to change it for prettify notebook the one for the cell gets changed instead.
Not sure if I'm clear: I am pressing the button for notebook but the cell shortcut is updated.
Thank you!
The text was updated successfully, but these errors were encountered: