Function: treemacs-canonical-path

treemacs-canonical-path is a byte-compiled function defined in treemacs-core-utils.el.

Signature

(treemacs-canonical-path PATH)

Documentation

The canonical version of PATH for being handled by treemacs.

In practice this means expand PATH and remove its final slash.

Aliases

treemacs--canonical-path

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(define-inline treemacs-canonical-path (path)
  "The canonical version of PATH for being handled by treemacs.
In practice this means expand PATH and remove its final slash."
  (declare (pure t) (side-effect-free t))
  (inline-letevals (path)
    (inline-quote
     (if (file-remote-p ,path)
         (treemacs--unslash ,path)
       (let (file-name-handler-alist)
         (-> ,path (expand-file-name) (treemacs--unslash)))))))