unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory
@ 2011-10-24 21:12 Andreas Politz
  2011-10-25  4:36 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Politz @ 2011-10-24 21:12 UTC (permalink / raw)
  To: 9864

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)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory
  2011-10-24 21:12 bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory Andreas Politz
@ 2011-10-25  4:36 ` Juri Linkov
  2011-10-25 12:47   ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2011-10-25  4:36 UTC (permalink / raw)
  To: Andreas Politz; +Cc: 9864

> 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'.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory
  2011-10-25  4:36 ` Juri Linkov
@ 2011-10-25 12:47   ` Stefan Monnier
  2011-10-25 13:22     ` Andreas Politz, INF|INF-I
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2011-10-25 12:47 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Andreas Politz, 9864

> 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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory
  2011-10-25 12:47   ` Stefan Monnier
@ 2011-10-25 13:22     ` Andreas Politz, INF|INF-I
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Politz, INF|INF-I @ 2011-10-25 13:22 UTC (permalink / raw)
  To: Stefan Monnier, Juri Linkov; +Cc: 9864

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-25 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 21:12 bug#9864: 24.0.90; dired/copying+dwim-target : misplaced directory Andreas Politz
2011-10-25  4:36 ` Juri Linkov
2011-10-25 12:47   ` Stefan Monnier
2011-10-25 13:22     ` Andreas Politz, INF|INF-I

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).