5

I am wonder how to start emacsclient in a new maximized frame.

emacsclient -c 

starts a new frame but the man page indicated no way to maximize this frame. There are no such options as --maximized.

Warning : this is no a duplicate from the post : How do I provide a command-line option to emacsclient?. Indeed, the answers of this post don't fix my issue. They use the -F option which seems to be documented on the man for them but which is not present in my man emacsclient (in debian sid) and the -F option does not work in my case :

$ emacsclient -c  -F "((fullscreen . maximized))"
     emacsclient: unrecognized option '-F'
     Try `emacsclient --help' for more information

Here is the result of emacsclient --help for information :

emacsclient --help
Usage: emacsclient [OPTIONS] FILE...
Tell the Emacs server to visit the specified files.
Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.

The following OPTIONS are accepted:
-V, --version           Just print version info and return
-H, --help              Print this usage information message
-nw, -t, --tty          Open a new Emacs frame on the current terminal
-c, --create-frame      Create a new frame instead of trying to
                        use the current Emacs frame
-e, --eval              Evaluate the FILE arguments as ELisp expressions
-n, --no-wait           Don't wait for the server to return
-d DISPLAY, --display=DISPLAY
                        Visit the file in the given display
-s SOCKET, --socket-name=SOCKET
                        Set filename of the UNIX socket for communication
-f SERVER, --server-file=SERVER
                        Set filename of the TCP authentication file
-a EDITOR, --alternate-editor=EDITOR
                        Editor to fallback to if the server is not running
                        If EDITOR is the empty string, start Emacs in daemon
                        mode and try connecting again

Report bugs with M-x report-emacs-bug.
Community
  • 1
  • 1
ppr
  • 685
  • 7
  • 24
  • Why not just start another emacs process? Is there a particular reason you have to use emacsclient for this task? Using regular emacs on Solaris I can launch it full screen from the command-line by using the `-fs` option. – Michael Warner Dec 10 '13 at 01:47
  • If you want to start in a maximized frame every time, you might want to try the first answer to [this question](http://stackoverflow.com/questions/1040143/how-to-automatically-evaluate-certain-lisp-code-after-starting-an-emacsclient?rq=1) – Michael Warner Dec 10 '13 at 01:51
  • Also, [this](http://stackoverflow.com/questions/4315739/how-can-i-set-styling-and-positioning-of-a-newly-created-emacsclient?rq=1) seems relevant to your post. – Michael Warner Dec 10 '13 at 01:53

3 Answers3

15
(add-to-list 'default-frame-alist '(fullscreen . fullboth)) 

in .emacs does the job.

ppr
  • 685
  • 7
  • 24
8

Here's a minimal working example from Evgeny's answer

  emacsclient -c -F "'(fullscreen . fullboth)"

  emacsclient -c -F "'(fullscreen . maximized)"

  alias ecx="emacsclient -c -F \"'(fullscreen . maximized)\""

  emacsclient -c -F "((width . 100) (height . 100) (left . 400))"
user178047
  • 1,264
  • 15
  • 20
3

You can try using ‘-F alist’ or ‘--frame-parameters=alist’ option.

alist format is described here

You can select width, height and font so that you'll have comfortable window size.

Evgeny Lukianchikov
  • 3,851
  • 3
  • 15
  • 9
  • Excuse me, but I couldn't decrypt the abbreviation you've used (MWE). Did you mean [MEW](http://www.emacswiki.org/emacs/Mew)? But I guess you ask me to show you a screenshot with emacsclient opened. If so, I'm afraid I can't do that - I don't use it. – Evgeny Lukianchikov Dec 12 '13 at 19:18
  • Sorry, MWE for minimal working example. That is to say a code which produces what I want (instead of indicate paths to a possible answer) – ppr Dec 12 '13 at 21:58
  • (add-to-list 'default-frame-alist '(width . 90)) (add-to-list 'default-frame-alist '(height . 40)) (add-to-list 'default-frame-alist '(font . "Monospace-10")) That's the code you can find following the link I provided. Sorry if this doesn't help you. – Evgeny Lukianchikov Dec 13 '13 at 11:10
  • This isn't fullscreen. I answered myself with the proper command (which is a correct MWE). But thanks for leading my to a solution (I give you the boundty). – ppr Dec 13 '13 at 11:48
  • I'm glad that it helped either way)) – Evgeny Lukianchikov Dec 14 '13 at 14:52