When I open a *.py file in emacs, and then exit emacs, I get a message about there being at least one python process still running, and whether or not I'd want to kill that. This is somewhat annoying, so I consider it a bug. At first there were two processes running, and I considered this a bug in app-emacs/python-mode. Downgrading that package reduced the number of processes to one. I then realized that emacs 24 ships its own python mode, and removed the python-mode package altogether. Still one process at termination. Now I read about edebug and elisp function instrumentation, and finally managed to obtain a backtrace for the location where that process was started. run-python(nil t) python-proc() semantic-python-get-system-include-path() (progn (semantic-python-get-system-include-path)) (if (featurep (quote python)) (progn (semantic-python-get-system-include-path))) (when (featurep (quote python)) (semantic-python-get-system-include-path)) eval((when (featurep (quote python)) (semantic-python-get-system-include-path))) custom-initialize-reset(semantic-python-dependency-system-include-path (when (featurep (quote python)) (semantic-python-get-system-include-path))) custom-declare-variable(semantic-python-dependency-system-include-path (when (featurep (quote python)) (semantic-python-get-system-include-path)) ("/usr/share/emacs/site-lisp/cedet/semantic/wisent/wisent-python.elc" . 1411) :group python :group semantic :type (repeat (directory :tag "Directory")) :set #[…]) wisent-python-default-setup() run-hooks(change-major-mode-after-body-hook prog-mode-hook python-mode-hook) apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook python-mode-hook)) run-mode-hooks(python-mode-hook) python-mode() set-auto-mode-0(python-mode nil) set-auto-mode() normal-mode(t) after-find-file(t t) find-file-noselect-1(#<buffer x.py> "~/tmp/x.py" nil nil "~/tmp/x.py" nil) find-file-noselect("~/tmp/x.py" nil nil t) find-file("~/tmp/x.py" t) call-interactively(find-file nil nil) So the code which triggers this appears to be /usr/share/emacs/site-lisp/cedet/semantic/wisent/wisent-python.el lines 79 through 83: (defcustom-mode-local-semantic-dependency-system-include-path python-mode semantic-python-dependency-system-include-path (when (featurep 'python) (semantic-python-get-system-include-path)) "The system include path used by Python language.") It would be nice if a) the call to (semantic-python-get-system-include-path) could be avoided or postponed till that value was actually needed, b) the started process were automatically terminated as well or c) the process could be killed without a question when closing emacs
Can you report this upstream please?
(In reply to comment #1) > Can you report this upstream please? Which upstream? The URL you pasted is for "python-mode.el", which as far as I understand things is using a different code base from the "python.el" shipped with emacs, which is what I'm using now. And both of these are distinct from cedet, aren't they? So which of these should I report this against? 1. Emacs as a whole, using bug-gnu-emacs@gnu.org 2. Dave Love, the original author of python.el, via e-mail 3. The cedet project, via its sourceforge bug tracker 4. Richard Kim, the current maintainer of wisent-python.el, via e-mail 5. Jan Moringen, the most recent copyright-holder of wisent-python.el 6. The python-mode launchpad project, as your URL indicates
As far as I can see, one of your two python processes is started by python-mode (from app-emacs/python-mode) when py-start-run-py-shell it non-nil. This should be the same issue as linked in the URL and should be reported to Andreas Roehler. The code that starts the second python process: (In reply to comment #0) > (defcustom-mode-local-semantic-dependency-system-include-path > python-mode semantic-python-dependency-system-include-path > (when (featurep 'python) > (semantic-python-get-system-include-path)) > "The system include path used by Python language.") seems only to be present in stand-alone app-emacs/cedet-1.1. In the CEDET included with Emacs 24.1 this is simply (in cedet/semantic/wisent/python.el): (defcustom-mode-local-semantic-dependency-system-include-path python-mode semantic-python-dependency-system-include-path nil "The system include path used by Python language.") So with the CEDET and progmodes/python.el that are included with Emacs 24.1, the issue shouldn't exist. Could you verify this?
(In reply to comment #3) > So with the CEDET and progmodes/python.el that are included with Emacs 24.1, > the issue shouldn't exist. Could you verify this? Sorry it took me so long. Yes, removing the stand-alone cedet package does make the python process go away. I hadn't realized that cedet was included in emacs. Thanks a lot for pointing this out.