You are not logged in.

#1 2017-06-25 12:37:30

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Does emacs have a notion of different KDE workspaces?

Hi

I'm trying to have emacs restore its frame positions to the KDE workspaces they were openend in upon last shutdown of the program, so that upon startup emacs puts the frames on different workspaces.

Unfortunately this doesn't work: all frames are always restored to ONE single workspace (the one emacs was started from).

Would this be a configuration within emacs or one of KDE, -- and is it possible at all?

Thanks!

Offline

#2 2017-06-25 13:17:21

seth
Member
Registered: 2012-09-03
Posts: 50,001

Re: Does emacs have a notion of different KDE workspaces?

window rules / remember  - depends on whether the windows are externally distinguishable (ie. titles, roles etc.)

Online

#3 2017-06-26 03:39:42

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Re: Does emacs have a notion of different KDE workspaces?

seth wrote:

window rules / remember  - depends on whether the windows are externally distinguishable (ie. titles, roles etc.)

Hi seth,

thanks: do you mean the configuration offered upon right-clicking in the titlebar, i.e. "Special Window Settings" > "Size & Position" > "{Position,Size,Desktop} = remember" ?

And: as these emacs frames all display different buffers (and display the corresponding file name in the titlebar), -- is this (emacs-internal) difference sufficient to make them distinguishable for KDE? What makes them, as you say, "externally distinguishable"? What is a "role"?

Thanks again for your input!

Offline

#4 2017-06-26 05:56:00

seth
Member
Registered: 2012-09-03
Posts: 50,001

Re: Does emacs have a notion of different KDE workspaces?

Basically yes.
You can also run kcmshell5 kwinrules
The first page has a detect button that allows you to pick windows.
Whether emacs exports enough relevant X window properties (what the WM can see) idk. It's also important that it exports them early (before the window is actually shown on screen)
The WM_WINDOW_ROLE property is part of the ICCCM spec. It's used differently but the key is really that you find *one* determining property that allows you to remember the window. (No guarantees on that)

ALso I'd only remember the desktop - emacs has a tendency to enter a race with the WM if it wants a certain size to be set (and according to your OP, it does so correctly)

Online

Board footer

Powered by FluxBB