GNU bug report logs - #9864
24.0.90; dired/copying+dwim-target : misplaced directory

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> fh-trier.de>

Date: Mon, 24 Oct 2011 21:11:01 UTC

Severity: normal

Found in version 24.0.90

To reply to this bug, email your comments to 9864 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#9864; Package emacs. (Mon, 24 Oct 2011 21:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Politz <politza <at> fh-trier.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 24 Oct 2011 21:11:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Politz <politza <at> fh-trier.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.90; dired/copying+dwim-target : misplaced directory 
Date: Mon, 24 Oct 2011 23:12:41 +0200
Create some directories :

$ find 
dest
dest/a
source
source/a
source/a/foo

Open two dired buffers in source + dest, enable `dired-dwim-target' and
dired-do-copy source/a to dest.  Now dest looks like this :

/tmp/dest
/tmp/dest/a
/tmp/dest/a/a
/tmp/dest/a/a/foo

A. Politz


In GNU Emacs 24.0.90.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-10-18 on cw-bkp0, modified by Debian
 (emacs-snapshot package, version 1:20111012-1+squeeze1)
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure  '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.0.90/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.0.90/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib//' '--with-x=yes' '--with-x-toolkit=gtk' '--with-imagemagick=yes' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: C
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  eldoc-mode: t
  shell-dirtrack-mode: t
  savehist-mode: t
  tooltip-mode: t
  mouse-wheel-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
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ > 0 ; 2 6 1 ; 0 c ESC ] 1 1 ; r g b : 0 0 0 0 
/ 0 0 0 0 / 0 0 0 0 ESC \ C-x 4 f ESC DEL 2 RET C-x 
o C-x o i D y y C-_ C-_ C-x o C RET y C-x o i C-_ C-p 
C-x C-c M-x b u g <tab> <M-backspace> <M-backspace> 
r e p o <tab> r t <tab> <return>

Recent messages:
Recursive copies of /tmp/1/a? (y or n)  y
Copy: 1 of 1
Copy: 1 file
Mark set
Undo!
Change in dired buffer undone.
Actual changes in files cannot be undone by Emacs.
(No files need saving)
When done with this frame, type C-x 5 0
Making completion list...

Load-path shadows:
/usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-decl-scan
/usr/share/emacs/site-lisp/haskell-mode/haskell-c hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-c
/usr/share/emacs/site-lisp/haskell-mode/haskell-ghci hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-ghci
/usr/share/emacs/site-lisp/haskell-mode/haskell-doc hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-doc
/usr/share/emacs/site-lisp/haskell-mode/haskell-indent hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-indent
/usr/share/emacs/site-lisp/haskell-mode/haskell-mode hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-mode
/usr/share/emacs/site-lisp/haskell-mode/haskell-hugs hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-hugs
/usr/share/emacs/site-lisp/haskell-mode/haskell-site-file hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-site-file
/usr/share/emacs/site-lisp/haskell-mode/haskell-cabal hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-cabal
/usr/share/emacs/site-lisp/haskell-mode/inf-haskell hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/inf-haskell
/usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-font-lock
/usr/share/emacs/site-lisp/haskell-mode/haskell-simple-indent hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-simple-indent
/usr/share/emacs/site-lisp/haskell-mode/haskell-indentation hides /usr/share/emacs/24.0.90/site-lisp/haskell-mode/haskell-indentation
/usr/share/emacs/24.0.90/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup

Features:
(shadow mail-extr message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
mail-utils gmm-utils mailheader emacsbug help-mode view dired-aux server
eldoc auctex-autoloads tex-site info c-eldoc-autoloads
sunrise-x-loop-autoloads sunrise-x-loop sunrise-commander term ehelp
electric sort find-dired disp-table enriched dired-x
sunrise-commander-autoloads package tabulated-list tramp tramp-compat
auth-source eieio assoc gnus-util mm-util mail-prsvr password-cache
shell format-spec tramp-loaddefs dired-details+ dired dired-details org
byte-opt warnings bytecomp byte-compile cconv macroexp advice help-fns
advice-preload ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table
org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete
pcomplete comint ring org-list org-faces org-compat org-entities
org-macs noutline outline easy-mmode cal-menu easymenu calendar
cal-loaddefs time-date savehist regexp-opt edmacro kmacro cl w3m-load
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9864; Package emacs. (Tue, 25 Oct 2011 04:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 9864 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Andreas Politz <politza <at> fh-trier.de>
Cc: 9864 <at> debbugs.gnu.org
Subject: Re: bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory
Date: Tue, 25 Oct 2011 07:36:04 +0300
> Create some directories :
>
> $ find
> dest
> dest/a
> source
> source/a
> source/a/foo
>
> Open two dired buffers in source + dest, enable `dired-dwim-target' and
> dired-do-copy source/a to dest.  Now dest looks like this :
>
> /tmp/dest
> /tmp/dest/a
> /tmp/dest/a/a
> /tmp/dest/a/a/foo

It's unclear what do you expect.  If you want to get this:

/tmp/dest
/tmp/dest/a
/tmp/dest/a/foo

then you have to remove the final slash in the minibuffer
after calling `dired-do-copy'.  So instead of:

  Copy a to: /home/work/emacs/test/dired-dwim/dest/ RET

you rather need this:

  Copy a to: /home/work/emacs/test/dired-dwim/dest RET

and then it will ask:

  Overwrite `/tmp/dest/a'? [Type yn!q or C-h] n

and then it's better to answer `n'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9864; Package emacs. (Tue, 25 Oct 2011 12:50:02 GMT) Full text and rfc822 format available.

Message #11 received at 9864 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: Andreas Politz <politza <at> fh-trier.de>, 9864 <at> debbugs.gnu.org
Subject: Re: bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory
Date: Tue, 25 Oct 2011 08:47:27 -0400
> It's unclear what do you expect.

The current behavior is wrong.  I see 3 valid outcomes:

    /tmp/dest
    /tmp/dest/a
    /tmp/dest/a/foo
or
    /tmp/dest
    /tmp/dest/a
    /tmp/dest/foo
or
    an error message or a prompt about the overwrite.

> If you want to get this:

> /tmp/dest
> /tmp/dest/a
> /tmp/dest/a/foo

> then you have to remove the final slash in the minibuffer
> after calling `dired-do-copy'.  So instead of:

>   Copy a to: /home/work/emacs/test/dired-dwim/dest/ RET

> you rather need this:

>   Copy a to: /home/work/emacs/test/dired-dwim/dest RET

That's counter intuitive: I'd expect either the terminating slash to be
of no consequence or else I'd expect "...dired-dwim/dest" to result in
the second option (i.e. copy the content of "source/a" into "dest") and
"...dired-dwim/dest" to result in the first option (i.e. copy the
contents of "source/a" into "dest/a").


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9864; Package emacs. (Tue, 25 Oct 2011 13:25:01 GMT) Full text and rfc822 format available.

Message #14 received at 9864 <at> debbugs.gnu.org (full text, mbox):

From: "Andreas Politz, INF|INF-I" <politza <at> fh-trier.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>,Juri Linkov <juri <at> jurta.org>
Cc: 9864 <at> debbugs.gnu.org
Subject: Re: bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory
Date: Tue, 25 Oct 2011 15:22:30 +0200
On Tue, 25 Oct 2011 08:47:27 -0400, Stefan Monnier wrote
> > It's unclear what do you expect.
> 

I expect it to work like 'cp -r', Stefans first outcome.  This is also how it
is (more or less) advertised in the info-manual (info "(emacs) Operating on
Files") .

> The current behavior is wrong.  I see 3 valid outcomes:
> 
>     /tmp/dest
>     /tmp/dest/a
>     /tmp/dest/a/foo
> or
>     /tmp/dest
>     /tmp/dest/a
>     /tmp/dest/foo
> or
>     an error message or a prompt about the overwrite.
> 

Andreas




This bug report was last modified 13 years and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.