I have rather blindly fixed a problem with a long path to a directory file raising an error in emacs. Am I going to break something by doing this? Description of the problem I was solving follows so that if this is a good fix, someone might find it here.
The short of it is that on my Mac OS X Yosemite I did
$ cd /var/folders/bh
$ sudo ln -s xqbvhy9j1hg21kb0bh_mm8jc0000gn/T/ tmpd
(where /var/folders/bh/xqbvhy9j1hg21kb0bh_mm8jc0000gn/T/ is the value of $TMPDIR)
and then I added this line to ~/.bash_profile
export TMPDIR="/var/folders/bh/tmpd/"
Will this symbolic link to my TMPDIR break anything? Will my system override this in the future?
Okay, now for a summary of the problem in Emacs 24.4.1 Cocoa that I had: I wanted to edit a remote file with C-x C-f
/ssh:user@host:/path/to/file
and I got an error complaining about the length of my temporary directory, something like "unix_listener, '/var/folders/bh/xqbvhy9j1hg2\ 1kb0bh_mm8jc0000gn/T/tramp.47310k2q.%r@%h:%p' too long for Unix domain socket". I found that this is set by temporary-file-directory, which I figured was just using the environment variable $TMPDIR, which it was, so I introduced the symbolic link and reset the environment variable (customising the variable in emacs didn't seem to work).