There is a serious resource leak when enable python layer with importmage package enabled.
The reproduce steps are:
enable python layer, and the imortmagic should also be instralled for its python layer dependency.
open a python source code,
start python interpreter
execute python-shell-send-buffer or other send function.
execute list-processes to show the process
You will see every time execute the step 4, the epc:server in process list will increaced.
The reason is the emacs-29 had enhanced implementation for with-temp-buffer which won't call the kill-buffer-hook while the importmagic-mode will create epc:server on mode hook and stop the epc:server on kill-buffer-hook but it won't be called for temp buffer.
This change will fix the issue with avoiding starting the epc:server for temp buffer.
Hi,
There is a serious resource leak when enable
python
layer withimportmage
package enabled. The reproduce steps are:python
layer, and theimortmagic
should also be instralled for its python layer dependency.python-shell-send-buffer
or other send function.list-processes
to show the process You will see every time execute the step 4, theepc:server
in process list will increaced. The reason is the emacs-29 had enhanced implementation forwith-temp-buffer
which won't call thekill-buffer-hook
while theimportmagic-mode
will createepc:server
on mode hook and stop theepc:server
onkill-buffer-hook
but it won't be called for temp buffer. This change will fix the issue with avoiding starting theepc:server
for temp buffer.Please help review and merge the patch. Thanks