Subject: bug#21537: 24.5; dired R rename of current directory

From: Kevin Ryde <[email-masked]>
Date: Wed, 23 Sep 2015 21:04:34 +1000

In dired, attempting to "R" rename the current directory gets an error,

   mkdir /tmp/foo
   emacs -Q /tmp/foo
   p, p               # move point to "." entry
   R /tmp/bar
   =>
   dired-rename-subdir-2: Expected to find `/tmp/foo/./' in headerline of /tmp/foo/

The directory is successfully renamed to "bar", but apparently something
in the refresh of the buffer does not recognise it.  It'd be good if the
notion of current directory in the buffer followed to the new name.

In GNU Emacs 24.5.1 (i586-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2015-06-29 on x86-csail-01, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
Configured using:
 `configure --build i586-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build i586-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=lucid --with-toolkit-scroll-bars
 --without-gconf --without-gsettings 'CFLAGS=-g -O2
 -fstack-protector-strong -Wformat -Werror=format-security -Wall'
 CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro'