Function: treemacs-mark-or-unmark-path-at-point
treemacs-mark-or-unmark-path-at-point is an autoloaded, interactive
and byte-compiled function defined in treemacs-file-management.el.
Signature
(treemacs-mark-or-unmark-path-at-point)
Documentation
Mark or unmark the absolute path of the node at point.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-file-management.el
;;;###autoload
(defun treemacs-mark-or-unmark-path-at-point ()
"Mark or unmark the absolute path of the node at point."
(interactive)
(treemacs-block
(-let [path (treemacs--prop-at-point :path)]
(treemacs-error-return-if (null path)
"There is nothing to mark here")
(treemacs-error-return-if
(or (not (stringp path)) (not (file-exists-p path)))
"Path at point is not a file or directory.")
(if (member path treemacs--marked-paths)
(progn
(setq treemacs--marked-paths
(remove path treemacs--marked-paths))
(treemacs-log "Unmarked path: %s" (propertize path 'face 'font-lock-string-face))
(treemacs-remove-annotation-face path "treemacs-marked-paths"))
(progn
(setq treemacs--marked-paths
(append treemacs--marked-paths (list path)))
(treemacs-log "Marked path: %s" (propertize path 'face 'font-lock-string-face))
(treemacs-set-annotation-face path 'treemacs-marked-file-face "treemacs-marked-paths")))
(treemacs-apply-annotations (treemacs--parent-dir path)))))