* bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works.
@ 2021-10-23 17:24 JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-23 18:11 ` Eli Zaretskii
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-23 17:24 UTC (permalink / raw)
To: 51357
In dired-mode when pressing 'C' on a directory to copy it somewhere, it
now only works in case the directory doesn't already exist. Otherwise it fails
with file-already-exists error.
Overwrite mode or not doesn't seem to make any difference.
It seems there's a change in copy-directory where make-directory used to
be called with parents hardcoded to 't'. Now it's not and it thereby
fails.
This used to work in emacs 24.5
In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
of 2019-08-29 built on CIRROCUMULUS
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor 'Microsoft Corp.', version 10.0.19042
Recent messages:
Loading .emacs_emacs...
Loading .emacs_tags...done
Loading .emacs_emacs...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Error during redisplay: (eval (replace-regexp-in-string "%" "%%" (or (gethash (selected-window) which-func-table) which-func-unknown))) signaled (wrong-type-argument arrayp nil) [5 times]
Mark set
Error during redisplay: (eval (replace-regexp-in-string "%" "%%" (or (gethash (selected-window) which-func-table) which-func-unknown))) signaled (wrong-type-argument arrayp nil) [9 times]
Making completion list...
Error during redisplay: (eval (replace-regexp-in-string "%" "%%" (or (gethash (selected-window) which-func-table) which-func-unknown))) signaled (wrong-type-argument arrayp nil) [2 times]
user-error: Beginning of history; no preceding item
Configured using:
'configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2
Important settings:
value of $LANG: ENU
locale-coding-system: cp1252
Major mode: Emacs-Lisp
Minor modes in effect:
which-function-mode: t
show-paren-mode: t
delete-selection-mode: t
shell-dirtrack-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: 1
line-number-mode: 1
transient-mark-mode: t
Load-path shadows:
c:/Users/Owner/AppData/Roaming/.emacs.d/elpa/magit-20210922.2141/magit-section-pkg hides c:/Users/Owner/AppData/Roaming/.emacs.d/elpa/magit-section-20210829.1849/magit-section-pkg
c:/Users/Owner/Desktop/emacs-26.3-x86_64/share/emacs/26.3/lisp/emacs-lisp/tq hides ~/emacs/tq
c:/Users/Owner/Desktop/emacs-26.3-x86_64/share/emacs/26.3/lisp/ffap hides ~/emacs/ffap
Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils add-log elec-pair
edmacro kmacro whitespace which-func paren ediff-merg ediff-wind
ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff etags xref
project delsel ffap erlang-start powershell executable json-mode
json-reformat subr-x json-snatcher js sgml-mode dom imenu thingatpt
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs hideshow python tramp-sh tramp tramp-compat
tramp-loaddefs trampver ucs-normalize shell pcomplete parse-time
format-spec json map term ehelp ipa finder-inf rx info package easymenu
epg-config url-handlers url-parse auth-source eieio eieio-core
eieio-loaddefs password-cache url-vars seq byte-opt bytecomp
byte-compile cconv compile comint ansi-color ring dired dired-loaddefs
benchmark-init advice cl-seq cl-macs gv cl-loaddefs cl-lib
benchmark-init-loaddefs server time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32
ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads w32notify w32
lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 435868 15416)
(symbols 48 35658 1)
(miscs 40 168 203)
(strings 32 110257 1870)
(string-bytes 1 3078403)
(vectors 16 54217)
(vector-slots 8 969607 18556)
(floats 8 185 136)
(intervals 56 501 41)
(buffers 992 14))
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works.
2021-10-23 17:24 bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-23 18:11 ` Eli Zaretskii
2021-10-24 18:03 ` Lars Ingebrigtsen
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2021-10-23 18:11 UTC (permalink / raw)
To: JeppeTh; +Cc: 51357
> Date: Sat, 23 Oct 2021 19:24:44 +0200
> From: JeppeTh--- via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> In dired-mode when pressing 'C' on a directory to copy it somewhere, it
> now only works in case the directory doesn't already exist. Otherwise it fails
> with file-already-exists error.
Even if the target directory name ends in a slash?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works.
2021-10-23 17:24 bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-23 18:11 ` Eli Zaretskii
@ 2021-10-24 18:03 ` Lars Ingebrigtsen
2021-10-25 9:58 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-25 15:56 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
3 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-24 18:03 UTC (permalink / raw)
To: JeppeTh; +Cc: 51357
JeppeTh@users.noreply.github.com writes:
> In dired-mode when pressing 'C' on a directory to copy it somewhere, it
> now only works in case the directory doesn't already exist. Otherwise it fails
> with file-already-exists error.
> Overwrite mode or not doesn't seem to make any difference.
>
> It seems there's a change in copy-directory where make-directory used to
> be called with parents hardcoded to 't'. Now it's not and it thereby
> fails.
I tried to reproduce this in Emacs 26.3 and failed. Here's what I
tried:
./src/emacs -Q .
I went to "admin" (a directory) and said:
C //tmp/newdir3 RET yes RET
Then I went to "etc" (another dir) and said:
C //tmp/newdir3 RET yes RET
And I didn't get any errors.
So do you have a step-by-step recipe to reproduce the problem?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works
2021-10-23 17:24 bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-23 18:11 ` Eli Zaretskii
2021-10-24 18:03 ` Lars Ingebrigtsen
@ 2021-10-25 9:58 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-25 13:45 ` Lars Ingebrigtsen
2021-10-25 15:56 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
3 siblings, 1 reply; 6+ messages in thread
From: JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-25 9:58 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 51357
Not sure if you missunderstood. This is kind of what I want to achieve
Linux:
> cd /some/directory
> cp -rf sub_directory /tmp/
Make some changes inside sub_directory - and then copy to /tmp again
> cp -rf sub_directory /tmp/
Emacs:
M-x find-file RET /some/directory RET
Move cursor to sub_directory
'C' and then /tmp/ RET
Will work in case /tmp/sub_directory doesn't exist.
Then press 'C' again and /tmp/ RET
Will now fail.
Fails in emacs 27 as well.
Haven't tried emacs 25 - but works in 24.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works
2021-10-25 9:58 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-25 13:45 ` Lars Ingebrigtsen
0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-25 13:45 UTC (permalink / raw)
To: JeppeTh; +Cc: 51357
JeppeTh@users.noreply.github.com writes:
> Emacs:
> M-x find-file RET /some/directory RET
> Move cursor to sub_directory
> 'C' and then /tmp/ RET
> Will work in case /tmp/sub_directory doesn't exist.
> Then press 'C' again and /tmp/ RET
> Will now fail.
Thanks; with that recipe I can reproduce the issue.
> Fails in emacs 27 as well.
> Haven't tried emacs 25 - but works in 24.5
It fails in 25.1, so I guess this changed between 24.5 and 25.1.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works
2021-10-23 17:24 bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
` (2 preceding siblings ...)
2021-10-25 9:58 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-25 15:56 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
3 siblings, 0 replies; 6+ messages in thread
From: JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-25 15:56 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 51357
I guess copy-directory was changed to not invoke make-directory with parents
hardcoded to 't' in emacs 25 then ;)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-25 15:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-23 17:24 bug#51357: 26.3; Recursively copy a directory into a destination where directory already exists no longer works JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-23 18:11 ` Eli Zaretskii
2021-10-24 18:03 ` Lars Ingebrigtsen
2021-10-25 9:58 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-25 13:45 ` Lars Ingebrigtsen
2021-10-25 15:56 ` JeppeTh--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.