0

Using the following command line causes Emacs to briefly display the initial frame, then hide it:

emacs -Q --eval "(setq initial-frame-alist '((visibility . nil)))"

This is consistent with the manual:

If these settings affect the frame geometry and appearance, you’ll see the frame appear with the wrong ones and then change to the specified ones. If that bothers you, you can specify the same geometry and appearance with X resources; those do take effect before the frame is created. See X Resources in The GNU Emacs Manual.

Which X resource should I use to make the initial frame invisible? Is there a cross-platform way to do so? On GNU/Linux, how can I set these resources for the duration of a single command?

  • The link to the following thread indicates a way to hack Emacs by adding something to subdirs.el, which is read by Emacs prior to reading the built-in startup.el (which we all know cannot be modified after building Emacs from source): emacs.stackexchange.com/a/24724/2287 Perhaps you can do the same? The comments throughout the thread give a better picture as to what is going on. – lawlist Aug 2 '16 at 4:26
  • Interesting! However, it seems to require modifying a file, which seems heavy for something that will just be temporary :/ – Clément Aug 2 '16 at 4:31
  • what are you trying to do? if you run emacs as emacs --daemon it loads your init but stays hidden. Then you can instantly create new frames with emacsclient when you need them. – Tyler Aug 9 '16 at 21:22

Your Answer

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

Browse other questions tagged or ask your own question.