I've been learning emacs the for last few days, trying to get some python development going, until I ran into this. Is it possible to create a shortcut to execute this command specificly? And if yes, what is this command exactly ? :) I've been doing some digging and didn't find quite the thing I was looking for.

![enter image description here]1


IIUC you want to run the command associated with the "Restart Python Process" menu entry in the image. In order to do that, do C-h k after which you want to select that menu entry. It will then tell you what command is associated with ("bound to") this menu entry.

You can then bind it to your favorite key (such as C-c C-r) with something like:

(add-hook 'inferior-python-mode-hook
          (lambda () (local-set-key [?\C-c ?\C-r]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.