5

Recently I updated Emacs to the newest version (26.2) which comes with new daemon functionality and Emacs server in combination with Systemd (Manjaro here).

Previously there were no issues with setting a server, but now I've got no idea what is going on.

I did what is recommended here (EmacsWiki) and here (StackExchange) so I have an emacs.service file and set systemctl --user enable emacs and systemctl --user start emacs but my emacsclient GUI comes out shrunk.

screenshot of Emacs with tiny text

What am I doing wrong?

j3k
  • 111
  • 7
  • How have you configured your fonts in Emacs? –  Aug 08 '19 at 15:04
  • @DoMiNeLa10 (set-face-attribute 'default nil :font "SF Mono-14") (set-frame-font "SF Mono" nil t) – j3k Aug 08 '19 at 16:28
  • 1
    Try something like `(add-to-list 'default-frame-alist '(font . "SF Mono-14"))` –  Aug 08 '19 at 16:51
  • Yeah, now the font is being displayed properly, but the hiding of the `(menu-bar-mode -1)`, `(tool-bar-mode -1)` and `(scroll-bar-mode -1)` doesn't work – j3k Aug 08 '19 at 20:55
  • Can you try evaluating these manually once Emacs has loaded? –  Aug 08 '19 at 21:11
  • 1
    Evaluating them manually works. I've actually removed the `(when (window-system) ...)` formula and now everything works properly. Thank you! – j3k Aug 09 '19 at 07:40
  • This is one of the quirks of running Emacs as a server. If you're worried about getting errors in Emacs compiled without GUI support with things like scrollbars, this code might work. I haven't tested it in a while though, and I wrote it when I was messing with elisp just a little bit too much: https://github.com/DoMiNeLa10/.emacs.d/blob/master/config/my-customization.el#L54-L59 –  Aug 09 '19 at 22:53

1 Answers1

6

The things that I did on the @DoMiNeLa10's advice:

  1. Set
(add-to-list 'default-frame-alist '(font . "SF Mono-14"))

instead of

(set-face-attribute 'default nil :font "SF Mono-14")
(set-frame-font "SF Mono" nil t)
  1. By playing around with evaluating (menu-bar-mode -1), (tool-bar-mode -1) and (scroll-bar-mode -1) I just found out that it works if I remove the formulae of
(when (window-system)
  ;; Then evaluate the menu-bar, tool-bar, scroll bar etc. disabling
  )

And the issue is gone.

j3k
  • 111
  • 7