Skip to content

Instantly share code, notes, and snippets.

@guehara
Created December 9, 2013 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guehara/7865594 to your computer and use it in GitHub Desktop.
Save guehara/7865594 to your computer and use it in GitHub Desktop.
emacs 24.3 fix directory for Mavericks
--- src/emacs.c.orig 2013-12-09 09:18:06.000000000 +0900
+++ src/emacs.c 2013-12-09 09:18:47.000000000 +0900
@@ -1158,6 +1158,11 @@
if (!noninteractive)
{
#ifdef NS_IMPL_COCOA
+ /* Started from GUI? */
+ /* FIXME: Do the right thing if getenv returns NULL, or if
+ chdir fails. */
+ if (! inhibit_window_system && ! isatty (0))
+ chdir (getenv ("HOME"));
if (skip_args < argc)
{
/* FIXME: Do the right thing if getenv returns NULL, or if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment