[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18232: 24.3.92; Filename completion changes the current working dire
bug#18232: 24.3.92; Filename completion changes the current working directory
Sat, 09 Aug 2014 21:56:01 +0200 (CEST)
C-x C-f (find-file) with filename completion changes the current
working directory (cwd) of emacs.
This is annoying for the following reason:
If you temporarily mount a filesystem and then visit a file in that
filesystem, you cannot unmount the filesystem because it is now the
cwd of a running process.
The obvious workaround is to first visit a file not in this
filesystem, but that is annoying and should be unnecessary.
I have narrowed the cause down to filename completion:
Starting with emacs -Q:
- Find the PID of the running emacs process.
- In a root shell, run “lsof -p PID | grep cwd”.
- Evaluate (read-file-name-default "Filename: ") and don't hit RETURN
- Navigate to some other directory, and cause filename completion to
happen. For example, type “/tmp/” and follow up with TAB.
- Run the lsof command again, and note that the current working
directory has changed.
In GNU Emacs 18.104.22.168 (x86_64-apple-darwin13.3.0, NS apple-appkit-1265.21)
of 2014-08-08 on airy
Windowing system distributor `Apple', version 10.3.1265
value of $LC_CTYPE: en_US.UTF-8
value of $LANG: C
- bug#18232: 24.3.92; Filename completion changes the current working directory,
Harald Hanche-Olsen <=