[OS X Emacs] NeXT emacs sets $DISPLAY

Adrian Robert adrian.b.robert at gmail.com
Sat Jan 19 05:14:15 EST 2008


On Jan 19, 2008 9:54 AM, xah lee <xah at xahlee.org> wrote:
> the NeXT Emacs seems to have quite a few problems that's frustrating.
>
> The problem is that when i run a shell comman for povray file, e.g.
> /usr/local/bin/povray mypov.pov
>
> it runs fine in Carbon emacs but in NeXT emacs it says
> "File Init Error:  The display 'xahg5.local' is not a valid display,
> or you do
>   not have permission to open a window there.
> "
>
> after 20 minutes of puzzling on this (among hours of elisping and
> trying to learn/fix/debug/test etc), it turns out it sets my shell
> $DISPLAY to "xahg5.local".
>
> Why is it setting my display?

Hi,

Could be a stale "~/.MacOSX/environment.plist".  Do a search on this
list for discussions.  You can either run
/path/to/Emacs.app/Contents/MacOS/bin/mac-fix-env , or run M-x
ns-grabenv (or run that in your .emacs) to fix this problem.  This is
covered in the manual (first entry under Help menu).

I'm not sure why you don't experience the problem under Carbon emacs.
Aquamacs does the equivalent of ns-grabenv on startup, maybe plain
Carbon does now too?



More information about the MacOSX-Emacs mailing list