8 Replies Latest reply: Feb 3, 2013 7:12 AM by Frank Caggiano
VicDiesel Level 1 (0 points)

I upgraded to Mountain Lion and replace X11 by Xquartz. Everything from macports works fine except emacs.


1. If I open a local window, then typing "emacs" in an xterm will behave like "emacs -nw": it opens in the xterm rather than in a separate window.


2. If I "ssh -X" to a different machine and invoke its emacs I do get a separate window, but it's way too big: it spans all the windows on my (fvm2) desktop, rather than the current window.


This is not a problem with the DISPLAY variable: programs like xpdf have no problem in popping up new windows.


Since these display problems happen with different emacs I suspect an XQuartz problem, but that's as much as I understand.



  • Frank Caggiano Level 7 (25,715 points)

    Are you sure you're running the macports emacs? what does which emacs show?

  • VictorEijkhout Level 1 (0 points)




  • Frank Caggiano Level 7 (25,715 points)

    Are you the OP?

  • VictorEijkhout Level 1 (0 points)

    Yes. I have no idea how I got to have two IDs.



  • Frank Caggiano Level 7 (25,715 points)

    Ah yes the joys of ASC


    Anyway you're question made me curious because while I have XQuartz I haven't used emacs in X in some time since the native version of emacs http://emacsformacosx.com has been out. This version is always up to date (it's at version 24) while the OS X version has been stuck on 22 for some time and it runs and looks  great on OS X.


    So I went off and downloaded emacs 24 source from the GNU site and compiled it here using

    configure --with-x

    to get x11 support into it.It compiled clean (except for not having the jpg, tiff and png libraries) and ran fine with X. When I start it from the terminal X starts and if I start it from an X terminal it  opened in its own window. Didn't try the ssh aspect of your question, don't have the setup here to do that.


    So emacs and XQuartz play fine together, the problem you are experiencing getting emacs to run in its own window is most likely not related to XQuartz.


    Is your install of XQuartz new? Have you just installed it? If so have you logged out and back in again since the install. This is needed to get the environment setup right and is mentioned in the install docs for XQuartz.


    Are you sure you are running the correct version of emacs. The version in /usr/bin is not X aware. As I said that is version 22, what is the version of emacs you have from macports. Assuming macports has a newer version when you start emacs check to see what version is running. If it's 22 you might be getting the /usr/bin version in some way.


    Finally are you sure the macports version is X aware. If you have Xcode installed on your machine compiling emacs yourself to ensure that is is X aware is not a big deal you may want to try that.


    And finally (again ) If you still have problems you might want to ask over on the Apple X11 mailing list. See

    X11-users -- X11 for Mac OS X discussion list



  • Don MacQueen1 Level 4 (2,470 points)

    Did you update emacs as well? I suppose it's possible that with the upgrade to Mountain Lion there could be some changes to some other libraries that emacs uses. I second the suggestion to tryhte X11-users mailing list.

  • VictorEijkhout Level 1 (0 points)

    This situations has persisted for a few weeks now, so everything has gone through several reboots; that can't be it. Emacs is as up to date as macports has it: 24.2.1


    Will try building myself, but I really think it's a window manager problem.



  • Frank Caggiano Level 7 (25,715 points)

    but I really think it's a window manager problem

    Its not.


    Did you read my post in its entirety?