Is there a variable like system-configuration-options that will provide the computed features of the running emacs? Specifically, I'm looking for X support (--with-x=yes|no).

Ultimately I'm trying to figure out why emacs isn't starting in GUI mode, but I recently had the bone-headed realization that I'd originally built emacs before installing any X environment. So I re-installed X and my ./configure call does mention X and GTK, so I would imagine that the support is there, but I'm not seeing emacs use a GUI. xeyes and even gedit work.

From ./configure:

checking for X... libraries , headers
checking for GTK... yes
checking whether GTK compiles... yes

After I ran make clean && make && make install, running emacs still opens in terminal mode :-(

If I can determine that emacs was indeed built with X support, I'll probably ask a separate question about why it's not working :-(

  • Is the Emacs version that is launching the one you expected, and of course, you want to avoid calling an alias that automatically uses the command-line argument -nw? – lawlist Aug 23 '18 at 3:32
  • I am launching the right emacs version (26.1) and which emacs produces /usr/local/bin/emacs (if memory serves; I'm building again now with an explicit --with-x11 configuration option). According to the answer below, X11 was indeed not one of the features available in that emacs. – Sean Allred Aug 23 '18 at 11:38

I believe that if system-configuration-features includes X11 then Emacs was compiled with X support.

That value is set in configure by the HAVE_X11 variable being true (look for: emacs_config_features=), which in turn is based on window_system=x11 which you can trace back through a more complicated set of tests.

  • Ack, I should've remembered that variable! X11 was not one of the options there -- so that explains why it wasn't working. Reconfiguring/rebuilding emacs with an explicit --with-x11 now pops up an X window as expected. Thanks so much! – Sean Allred Aug 23 '18 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.