all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18232: 24.3.92; Filename completion changes the current working directory
@ 2014-08-09 19:56 Harald Hanche-Olsen
  2014-08-10  2:45 ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Harald Hanche-Olsen @ 2014-08-09 19:56 UTC (permalink / raw)
  To: 18232

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 24.3.92.2 (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
Configured using:
 `configure --with-ns'

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: C
  locale-coding-system: utf-8-unix





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

end of thread, other threads:[~2014-08-11  5:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-09 19:56 bug#18232: 24.3.92; Filename completion changes the current working directory Harald Hanche-Olsen
2014-08-10  2:45 ` Glenn Morris
2014-08-10  8:03   ` Harald Hanche-Olsen
2014-08-10 13:02     ` Jan Djärv
2014-08-10 21:08       ` Paul Eggert
2014-08-11  5:06         ` Jan Djärv

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.