On 30/03/2013 15:29, Gijs Hillenius wrote:
> Hello,
>
> I'm trying to teach Debian emacs-snapshot to stay on workspace #4, as
> defined in WMWindowAttributes. The stubborn application listens only
> partially: it will /not/ start where instructed, but on whatever desktop
> happens to be displayed, but it _will_ StartMaximized, also requested in
> WMWindowAttributes.
>
> My WMWindowAttributes contains two instances of emacs, one for
> emacs-snapshot, and one for emacs23. I quote:
>
> ,----
> | emacs-snapshot.Emacs = {
> | StartWorkspace = "Workspace 4";
> | StartMaximized = Yes;
> | };
> | emacs23.Emacs = {
> | StartWorkspace = "Workspace 4";
> | };
> `----
>
> If I launch emacs23 from desktop#[1-6] the application will
> start on desktop#4. I want the same from emacs-snapshot.
>
> I've run a bunch of xprop to check if it something to do with the
> WM_CLASS. I see four versions:
>
> 1) emacs-snapshot (the application itself)
> WM_CLASS(STRING) = "emacs-snapshot", "Emacs"
>
> 2) emacs-snapshot (the pop-up that appears when closing emacs using
> WindowMakers [x])
> WM_CLASS(STRING) = "emacs-snapshot", "Emacs-snapshot"
>
> 3) emacs23 (app)
> WM_CLASS(STRING) = "emacs23", "Emacs"
>
> 4) emacs23 (pop-up)
> WM_CLASS(STRING) = "emacs23", "Emacs23"
>
>
> I noticed that it makes a difference whether or not I use quote
> marks. If I define WMWindowAttributes like this (note the "):
>
> "emacs-snapshot.Emacs-snapshot" = {
> StartWorkspace = "Workspace 4";
> StartMaximized = Yes;
> };
>
> then the pop up (in 2, above) will become maximized on desktop 4,
> irrespective of what desktop is displayed. If I remove the quote marks,
> the pop up will not maximize and will be on whatever desktop happens to
> be displayed.
>
> So, naturally I tried "emacs-snapshot.Emacs", but that does not put
> emacs-snapshot on the intended desktop.
>
>
> I wonder if my definition in WMWindowAttributes is correct. One clue is
> that emacs and emacs-snapshot are actually emacs-snapshot-gtk, per
> /etc/alternatives. But even if I edit WMWindowAttributes to read:
>
> emacs.Emacs
>
> or
>
> emacs-snaphot-gtk.Emacs
>
> with and without ", it still won't go to desktop#4.
>
>
> So, maybe WM_Class has other values, hidden somewhere, or WindowMaker
> looks in another place for WM_CLASS.
>
> Anyone here know more about the internals? There is a bug report on
> Ubuntu,
>
> https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/725988
>
> that mentions: "emacs ships an emacs.desktop file, but the Debian source
> package uses its own emacsVER.desktop file. Unfortunately, this messes
> up libraries like the shell application trackers and bamf that use
> WM_CLASS as a basis for the application."
>
> I'm guessing this has something to do with it.
>
>
>
Did you try launch emacs, then go to window Attributes, then "Window
specification" and Select "Emacs" or something like?
Cheers,
kix
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
--
To unsubscribe, send mail to [email protected].