In emacs lisp how do I silence "Process python-process finished"
In emacs lisp how do I silence "Process python-process finished"
# Silencing "Process python-process finished" Messages in Emacs Lisp To silence those "Process python-process finished" messages, the most direct approach is to set the `comint-quiet-sentinel` variable to `t`. This variable controls whether Emacs displays messages when processes managed by comint-mode (which Python processes use) terminate.
1 2 | ;; Add this to your Emacs configuration (setq comint-quiet-sentinel t) |
1 2 3 4 5 6 7 | ;; Only silence Python process messages (defun silence-python-sentinel () (when (eq major-mode 'inferior-python-mode) (setq-local comint-quiet-sentinel t))) ;; Add this hook to apply the setting when a Python process starts (add-hook 'inferior-python-mode-hook #'silence-python-sentinel) |
1 2 3 4 | (advice-add 'python-shell-sentinel :around (lambda (orig-func proc event) (let ((inhibit-message t)) (funcall orig-func proc event)))) |
Testing if the previous output contains the string set-process-sentinel
: False
In emacs lisp how do I silence "Process python-process finished"
In emacs lisp how do I silence "Process python-process finished"
# Silencing "Process python-process finished" Messages in Emacs Lisp To silence the "Process python-process finished" messages in Emacs, you have a few options: ## Option 1: Advice the process sentinel function
1 2 3 4 5 6 7 8 | (defun silence-python-process-sentinel (process event) "Silence the message when Python processes finish." (unless (and (string-prefix-p "python" (process-name process)) (string= event "finished\n")) (internal-default-process-sentinel process event))) (advice-add 'internal-default-process-sentinel :override #'silence-python-process-sentinel) |
1 | (setq process-echo-area-messages nil) |
1 2 3 4 | (advice-add 'python-shell-process-sentinel :around (lambda (orig-fun &rest args) (let ((inhibit-message t)) (apply orig-fun args)))) |
1 | (setq python-shell-enable-process-name-in-feedback nil) |
Testing if the previous output contains the string set-process-sentinel
: False