Question

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 ...???
Was it helpful?

Solution 2

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"

OTHER TIPS

You can also use the -F parameter that sets the frame alist and combine it with the -e parameter for executing what you like, so there's no need to define any function. The invocation would then look like this:

emacsclient -F '((name . "Mail"))' -e '(gnus)'

For information about the parameters, see (info "(elisp)Frame parameters").

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top