Created
September 26, 2025 10:08
-
-
Save andiogenes/cb318dde8e8e49f4809f892d46da563a to your computer and use it in GitHub Desktop.
Dired - Copy file to the directory of window selected by AceWindow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Dired - Copy file to the directory of window selected by AceWindow | |
| (defun arx/dired-do-copy-ace-window () | |
| (interactive) | |
| (when-let ((dst-dir (aw-select | |
| "Copy file to the directory of other window" | |
| (lambda (w) | |
| (with-selected-window w | |
| default-directory)))) | |
| (src-file (or (dired-get-subdir) (dired-get-filename))) | |
| (_ (y-or-n-p (format "Copy %s to %s?" src-file dst-dir)))) | |
| (if (file-directory-p src-file) | |
| (copy-directory src-file dst-dir) | |
| (copy-file src-file dst-dir)))) | |
| (keymap-set dired-mode-map "V" 'arx/dired-do-copy-ace-window) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment