Doom-emacs: [REQUEST] No new workspace created on incoming emacsclient sessions

Created on 24 Oct 2019  ·  3Comments  ·  Source: hlissner/doom-emacs

Describe the feature
I like the workspace approach in doom emacs very much. After some usages, one item bothers me is that an anonymous workspace (#n) is created each time an emacsclient session is in. Since I tend to have many sessions, then I end up with many confusing #n workspaces.

Can we set it up that no new workspace will be created for emacsclient sessions? The default main workspace will be used for all such sessions. It would be up to the user to decide whether a new workspace is needed.

  • How is it helpful?

This feature is helpful to keep emacs work environment clean.

System information


emacs version 26.1
features XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2
build Feb 03, 2019
buildopts (--build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs-26.1+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro)
windowsys nil
daemonp daemon
doom version 2.0.9
build HEAD -> develop, origin/develop, origin/HEAD 3140ab733 2019-10-23 22:28:44 -0400
system type gnu/linux
config x86_64-pc-linux-gnu
shell /bin/zsh
uname Linux 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64
path (/usr/local/bin /usr/local/sbin /usr/bin /bin /usr/games /usr/lib/surfraw ~/.fzf/bin ~/02-computing/linux/bin ~/.local/bin ~/.emacs.d/bin /usr/lib/emacs/26.1/x86_64-linux-gnu)
config envfile nil
elc-files 0
modules (:completion company (ivy +fuzzy) :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +all +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold (format +onsave) multiple-cursors rotate-text snippets :emacs dired electric vc :term eshell term :tools eval flycheck (lookup +docsets) magit make tmux :lang cc clojure data emacs-lisp ess javascript markdown (org +dragndrop +ipython +pandoc +present) python sh :config (default +bindings +smartparens))
packages (n/a)
elpa (n/a)

:ui workspaces new redaemon interface

Most helpful comment

Also, it could be the default setting for the workspace plugin. How do you think?

All 3 comments

This should do it:

(after! persp-mode
  (setq persp-emacsclient-init-frame-behaviour-override "main"))

Great, it works out nicely.

Also, it could be the default setting for the workspace plugin. How do you think?

Was this page helpful?
0 / 5 - 0 ratings