2025-02-15 23:44:40 +06:00
|
|
|
(defun i/move-to-new-directory ()
|
|
|
|
(interactive)
|
|
|
|
(let ((new-directory (dired-current-directory)))
|
2025-04-18 21:40:38 +06:00
|
|
|
(with-temp-buffer
|
|
|
|
(insert-file-contents "/tmp/curr")
|
|
|
|
(goto-char (point-min))
|
|
|
|
(while (not (eobp))
|
|
|
|
(let ((line (string-trim (thing-at-point 'line t))))
|
|
|
|
(start-process "mv-process" nil "mv" "-f" line new-directory))
|
|
|
|
(forward-line 1))
|
|
|
|
(message "Finish"))))
|
2025-02-15 23:44:40 +06:00
|
|
|
|
|
|
|
|
|
|
|
(defun i/copy-to-new-directory ()
|
|
|
|
(interactive)
|
|
|
|
(let ((new-directory (dired-current-directory)))
|
|
|
|
(with-temp-buffer
|
|
|
|
(insert-file-contents "/tmp/curr")
|
|
|
|
(goto-char (point-min))
|
|
|
|
(while (not (eobp))
|
|
|
|
(let ((line (thing-at-point 'line t)))
|
|
|
|
(async-shell-command (concat "copy " (replace-regexp-in-string "\n" "" line) " " new-directory)))
|
|
|
|
(forward-line 1))
|
|
|
|
(message "Finish"))))
|
|
|
|
|
|
|
|
|
|
|
|
(defun i/clear-marks ()
|
|
|
|
(interactive)
|
|
|
|
(shell-command "rm /tmp/curr"))
|