Skip to content

Copy external file drops into Treemacs projects#1189

Open
liang799 wants to merge 4 commits intoAlexander-Miller:masterfrom
liang799:tianpok/dnd-save-to-project
Open

Copy external file drops into Treemacs projects#1189
liang799 wants to merge 4 commits intoAlexander-Miller:masterfrom
liang799:tianpok/dnd-save-to-project

Conversation

@liang799
Copy link
Copy Markdown

Summary

  • add a Treemacs mouse customization for external drag-and-drop file copying
  • handle dropped local file URIs in treemacs-mode by prompting to copy them into the project at point
  • keep non-Treemacs drops and disabled-copy behavior on Emacs' default DND opening path
  • document the behavior and cover copy, collision, and fallback paths in tests

Validation

  • Ran the full Buttercup suite: Ran 257 specs, 0 failed
  • Byte-compiled the changed Elisp files with warnings as errors using a temporary output directory

Notes

This PR keeps the feature disabled only when treemacs-copy-files-by-external-drag-and-drop is set to nil. The default is enabled so dropping readable local files onto a Treemacs project mirrors IDE-style project import behavior while still asking before copying.

@liang799 liang799 changed the title Copy external file drops into Treemacs projects#1 Copy external file drops into Treemacs projects Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant