     (setq-local live-py-parent (directory-file-name
                                 (file-name-directory live-py-parent))))
   (setq live-py-dir (file-name-as-directory live-py-dir))
-  (live-py-trace-update)
+  (live-py-update-all)
   (message "Working directory set to %s." live-py-dir))
 
 (defun live-py-set-path()

    (setq-local live-py-point-line-nr -1)
    (add-hook 'kill-buffer-hook 'live-py-mode-off nil t)
    (add-hook 'after-change-functions 'live-py-after-change-function nil t)
    (live-py-show-output-window)
    (live-py-trace-update)
    (add-hook 'post-command-hook 'live-py-check-to-scroll nil t))
   ;; Turning the mode OFF.
   (t
    (remove-hook 'after-change-functions 'live-py-after-change-function t)
    (remove-hook 'post-command-hook 'live-py-check-to-scroll t)
    (remove-hook 'kill-buffer-hook 'live-py-mode-off t)
    (ignore-errors (kill-buffer live-py-trace-buffer))
    (when (window-valid-p live-py-output-window)

(defvar-local live-py-lighter nil)

(defun live-py-after-change-function (start stop len)
  "Start or restart timer to run `live-py-update-all'.
START, STOP and LEN are required by `after-change-functions' but unused."
  (ignore start stop len)
  (if live-py-timer
