Subject: Re: bug#18232: 24.3.92; Filename completion changes the current working directory
From: Paul Eggert <[email-masked]>
To: Jan Djärv <[email-masked]>, Harald Hanche-Olsen <[email-masked]>
Cc: Glenn Morris <[email-masked]>, [email-masked]
Date: Sun, 10 Aug 2014 14:08:15 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Jan Djärv wrote:
> This bug needs to be fixed in the GNULib code, by really use restore_cwd as it was intended

Just to clarify, the bug is Emacs's little substitute for Gnulib, not in 
Gnulib itself.  Perhaps at some point Emacs should just use Gnulib here, 
but for now it's safer to migrate a bit more of Gnulib into Emacs to 
avoid this regression.  I reproduced the problem on Fedora 20 by 
building an Emacs that was crippled to not use readlinkat etc., and 
installed a patch that worked for me as emacs-24 bzr 117437 (simplified 
in 117438).