tweak(lib): open file after doom/copy-this-file
As mentioned in #6964, it's rare for anyone to want to copy a file without opening the new file. Close: #6964
This commit is contained in:
parent
c7c686cc26
commit
2c652259a5
1 changed files with 2 additions and 1 deletions
|
@ -425,7 +425,7 @@ If FORCE-P, delete without confirmation."
|
|||
|
||||
;;;###autoload
|
||||
(defun doom/copy-this-file (new-path &optional force-p)
|
||||
"Copy current buffer's file to NEW-PATH.
|
||||
"Copy current buffer's file to NEW-PATH then open NEW-PATH.
|
||||
|
||||
If FORCE-P, overwrite the destination file if it exists, without confirmation."
|
||||
(interactive
|
||||
|
@ -437,6 +437,7 @@ If FORCE-P, overwrite the destination file if it exists, without confirmation."
|
|||
(new-path (expand-file-name new-path)))
|
||||
(make-directory (file-name-directory new-path) 't)
|
||||
(copy-file old-path new-path (or force-p 1))
|
||||
(find-file new-path)
|
||||
(doom-files--update-refs old-path new-path)
|
||||
(message "File copied to %S" (abbreviate-file-name new-path))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue