Function: treemacs-paste-dir-at-point-to-minibuffer

treemacs-paste-dir-at-point-to-minibuffer is an interactive and byte-compiled function defined in treemacs-interface.el.

Signature

(treemacs-paste-dir-at-point-to-minibuffer)

Documentation

Paste the directory at point into the minibuffer.

This is used by the "Paste here" mouse menu button, which assumes that we are running treemacs--copy-or-move, so that pasting this path into the minibuffer allows us to copy/move the previously-selected file into the path at point.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-interface.el
(defun treemacs-paste-dir-at-point-to-minibuffer ()
  "Paste the directory at point into the minibuffer.
This is used by the \"Paste here\" mouse menu button, which assumes that we are
running `treemacs--copy-or-move', so that pasting this path into the minibuffer
allows us to copy/move the previously-selected file into the path at point."
  (interactive)
  (treemacs-block
   (treemacs-error-return-if (not (active-minibuffer-window))
     "Minibuffer is not active")
   (let* ((path-at-point (treemacs--prop-at-point :path))
          (dir (if (file-directory-p path-at-point)
                   path-at-point
                 (file-name-directory path-at-point))))
     (select-window (active-minibuffer-window))
     (delete-region (minibuffer-prompt-end) (point-max))
     (insert dir))
   (message "Copied from treemacs")))