2

Whenever I launch a GUI session as $ emacsclient -c all the emacsclient sessions I've created with $ emacsclient -nw -c lose several settings. The problem only occurs right after launching a GUI session, so everything is fine when working soley from the terminal or when avoiding the use of emacsclient.

Now, I've already found out that you can fix some of these issues by adding to the after-make-frame-functions hook. However, one issue persist because it seems to be out of emacs control. Namely, whenever a terminal frame is resized (this happens frequently due to me using a tiling wm) it's doesn't properly refresh it's contents. This can be partly fixed by adding a call to redraw-display (or possibly redraw-frame) to the after-make-frame-functions hook, as this will tell all the existing emacs frames to update whenever a new one is made.

There is a catch to this unfortunately: redraw-display obviously won't get called when opening up a new window that is not emacs, say a browser window. Therefore, all my emacs sessions will eventually become all garbled up until I refresh them all manually. Does anyone know how you can tell GUI sessions not to change any/my terminal sessions, or leave alone the frame refreshing? Or should I maybe change something else, like the way emacslient spawns instances? Can I seperate my GUI and terminal sessions completely maybe?

I'm running macOS 10.3.3 and emacsclient/emacs version 25.3.1. I manage my emacs daemon with brew services, if that is of relevance. My GUI emacs is plain Cocoa emacs installed from brew.

  • Can you reproduce this without your init file? If not, you need to post your init file, preferably shrunk to the smallest part that still has the problem. – Gilles 'SO- stop being evil' Mar 20 '18 at 23:11
  • Unfortunately yes, if I launch the daemon like $ emacs --no-init-file --daemon=\0123,4\012 the resizing is just as bad as with my config file. – rien333 Mar 21 '18 at 13:38

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.