Function: treemacs--is-event-relevant?

treemacs--is-event-relevant? is a byte-compiled function defined in treemacs-filewatch-mode.el.

Signature

(treemacs--is-event-relevant? EVENT)

Documentation

Decide if EVENT is relevant to treemacs or should be ignored.

An event counts as relevant when
1) The event's action is not "stopped".
2) The event's action is not "changed" while treemacs-git-mode(var)/treemacs-git-mode(fun) is disabled
3) The event's file will not return t when given to any of the functions which
   are part of treemacs-ignored-file-predicates.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-filewatch-mode.el
(define-inline treemacs--is-event-relevant? (event)
  "Decide if EVENT is relevant to treemacs or should be ignored.
An event counts as relevant when
1) The event's action is not \"stopped\".
2) The event's action is not \"changed\" while `treemacs-git-mode' is disabled
3) The event's file will not return t when given to any of the functions which
   are part of `treemacs-ignored-file-predicates'."
  (declare (side-effect-free t))
  (inline-letevals (event)
    (inline-quote
     (when (with-no-warnings treemacs-filewatch-mode)
       (let ((action (cadr ,event)))
         (not (or (eq action 'stopped)
                  (and (eq action 'changed)
                       (not treemacs-git-mode))
                  (and treemacs-hide-gitignored-files-mode
                       (let* ((file (caddr ,event))
                              (parent (treemacs--parent-dir file))
                              (cache (ht-get treemacs--git-cache parent)))
                         (and cache (eq 'treemacs-git-ignored-face (ht-get cache file)))))
                  (let* ((dir (caddr ,event))
                         (filename (treemacs--filename dir)))
                    (--any? (funcall it filename dir) treemacs-ignored-file-predicates)))))))))