Function: treemacs-copy-filename-at-point

treemacs-copy-filename-at-point is an interactive and byte-compiled function defined in treemacs-interface.el.

Signature

(treemacs-copy-filename-at-point)

Documentation

Copy the filename of the node at point.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-interface.el
(defun treemacs-copy-filename-at-point ()
  "Copy the filename 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 copy here")
     (treemacs-error-return-if (not (stringp path))
       "Path at point is not a file.")
     (let ((filename (file-name-nondirectory path)))
       (kill-new filename)
       (treemacs-pulse-on-success "Copied filename: %s" (propertize filename 'face 'font-lock-string-face))))))