Subject: 24.0.92; dired-do-copy may create infinite directory hierarchy

From: Michael Heerdegen <[email-masked]>
Date: Thu, 12 Jan 2012 20:35:19 +0100

Hello,

start emacs -Q.

Suppose you have a directory "~/Test".  Do C-x d ~ RET.  Jump to the
line showing "Test".  Hit C and enter "~/Test".  Answer "yes" to the

 Recursive copies of /home/micha/Test? (yes or no) 

question.

This creates an huge recursive hierarchy of "Test" directories

  ~/Test/Test/Test/Test/Test/Test/Test/Test/Test/Test/Test/Test/...

The error

  copy-directory: Variable binding depth exceeds max-specpdl-size

finally stops that.

The user may do something like that per accident.  Emacs should IMHO not
behave like that.

The problem also appears in Emacs 23.

Thanks,

Michael. 

In GNU Emacs 24.0.92.1 (i486-pc-linux-gnu, GTK+ Version 3.2.3)
 of 2012-01-11 on zelenka, modified by Debian
 (emacs-snapshot package, version 1:20120111-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11102902
configured using `configure  '--build' 'i486-linux-gnu' '--host' 'i486-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.92/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.0.92/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/i386-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2''

Important settings:
  value of $LC_ALL: de_DE.utf8
  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: C
  value of $LANG: de_DE.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t