In emacs lisp how do I silence "Process python-process finished"
In emacs lisp how do I silence "Process python-process finished"
To silence the "Process python-process finished" message in Emacs Lisp, you can use the following code:
1 | (advice-add 'python-mode :after (lambda () (set-process-query-on-exit-flag (get-process "python-process") nil))) |
1 | (setq kill-buffer-query-functions (remq 'process-kill-buffer-query-function kill-buffer-query-functions)) |
1 2 3 4 5 | (defadvice kill-process (around silence-python-process-query activate) (let ((process (ad-get-arg 0))) (if (string= (process-name process) "python-process") (setq ad-return-value (kill-process process t)) ad-do-it))) |
1 2 3 4 5 6 | (advice-add 'kill-process :around #'silence-python-process-query) (defun silence-python-process-query (orig-fn &rest args) (let ((process (car args))) (if (string= (process-name process) "python-process") (apply orig-fn args t) (apply orig-fn args)))) |
Testing if the previous output contains the string set-process-sentinel
: False