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 message "Process python-process finished" in Emacs Lisp, you can set a custom process sentinel that suppresses the message. Here's how:
1 2 3 4 5 6 7 8 9 | ;; Define a custom sentinel that doesn't display the exit message (defun silent-process-sentinel (process event) "Handle PROCESS EVENT without displaying messages." (force-mode-line-update)) ; Optional: Update mode line if needed ;; After starting the Python process, set its sentinel (let ((proc (get-process "python-process"))) ; Replace "python-process" with your process name (when proc (set-process-sentinel proc #'silent-process-sentinel))) |
1 2 3 4 5 6 | ;; Advise 'run-python' to set the sentinel afterward (advice-add 'run-python :after (lambda (&rest _) (let ((proc (get-process "Python"))) ; Default process name for 'run-python' (when proc (set-process-sentinel proc #'silent-process-sentinel))))) |
Testing if the previous output contains the string set-process-sentinel
: True