I am at the moment using a separate instance for guns, which I start as follow:
emacs --name Mail --title Mail --no-desktop --no-splash --funcall gnus
As gnus is nicely responsive, and all my other emacs stuff is running as emacsclient from a different emacs instance, I would like to try to run gnus also from as emacsclient. But I am struggling to translate the commnd line options I use. I have to set the windos name and title, as I am using awesome windows manager and the window should be sortet according the window name. Also, I would like to start gnus automatically.
So how can I translate the above command, that gnus is started as emacsclient with the windows name and title set to Mail?
emacsclient ...???
I'm not sure you can do this using only command-line switches. However, it is possible to define an elisp function to set-up a gnus frame, and call this function from emacsclient.
Try putting this in your emacs initialization file:
(defun my/create-gnus-frame ()
"Create a new frame running `gnus'."
(select-frame
(make-frame '((name . "Mail"))))
(gnus))
and run gnus like this from the command-line:
emacsclient -e '(my/create-gnus-frame)'
And the X properties (as obtained with xprop
) of the newly created frame seem to be correct:
WM_CLASS(STRING) = "Mail", "Emacs"
WM_ICON_NAME(STRING) = "Mail"
WM_NAME(STRING) = "Mail"