Whenever elpy-mode is activated upon visiting a python file, I see a py.exe executable start, with a subtree of processes. This should be the remote procedure call (thanks @al0 for the explanation). It's what Elpy uses to check syntax, documentation, etc. Just to be clear I'm not speaking of the Python interpreter, started with run-python.

After I kill the buffer with the python code and elpy-mode, I see that the spanned RPC process and its tree are still alive. This happens even if I don't have any buffers, open or buried, with elpy-mode.

I don't quite see the point of the RPC remaining alive. Is this by design? Is there a command or function to kill it? At the moment I must open the task manager to kill it.

  • 1
    Presumably this is the rpc. I only see restart, not kill in the docs. Is it just alive or actually running?
    – al0
    Apr 12, 2020 at 20:01
  • 1
    Indeed it is, I'll edit my question to mention this. From what I see it is only alive; but it does use RAM, which in some cases would be precious to have available for something else.
    – pglpm
    Apr 12, 2020 at 22:58
  • 1
    @al0 Thank you for the implicit suggestion. The command elpy-rpc-restart kills the rpc, and it restarts it – but only if the elpy buffer still exists. So a solution is to first kill the buffer and then call M-x elpy-rpc-restart. Maybe this can be automated in some hook. Please feel free to write your suggestion as a solution.
    – pglpm
    Apr 12, 2020 at 23:08
  • 3
    It would be normal for there to be a buffer (perhaps hidden) associated with the process. Have a look at M-x list-processes
    – phils
    Apr 12, 2020 at 23:21
  • 1
    @phils You're right. There's an invisible buffer called elpy-rpc. Killing that buffer also kills the process. Thank you very much.
    – pglpm
    Apr 13, 2020 at 8:06


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.