Function: treemacs--stop-watching-all

treemacs--stop-watching-all is a byte-compiled function defined in treemacs-filewatch-mode.el.

Signature

(treemacs--stop-watching-all)

Documentation

Cancel any and all running file watch processes.

Clear the filewatch and collapsed filewatch indices. Reset the refresh flags of every buffer.

Called when filewatch mode is disabled.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-filewatch-mode.el
(defun treemacs--stop-watching-all ()
  "Cancel any and all running file watch processes.
Clear the filewatch and collapsed filewatch indices.
Reset the refresh flags of every buffer.

Called when filewatch mode is disabled."
  (treemacs-run-in-every-buffer
   (treemacs--maphash treemacs-dom (_ node)
     (setf (treemacs-dom-node->refresh-flag node) nil)))
  (treemacs--maphash treemacs--filewatch-index (_ watch-info)
    (file-notify-rm-watch (cdr watch-info)))
  (ht-clear! treemacs--filewatch-index)
  (ht-clear! treemacs--collapsed-filewatch-index))