Subject: FVWM: How to get xemacs frames to map to current desk?

From: Von Welch <[email-masked]>
Date: Wed, 9 Feb 2000 15:44:15 -0600

Hello all - I'm looking for some advice to solving a minor annoyance
between xemacs and fvwm2. This might be a xemacs problem, but I thought
I'd try here first.

I'm running fvwm2 (see below for exact version) with multiple desktops.
I run xemacs with gnuserve, and I then use gnuclient from a fvwm2
menu to spawn new xemacs frames. What I would like is the new xemacs
frame I create to always appear on the current desktop. What happens
though is that the created frame always appears on a desktop with an
existing xemacs frame instead of the current desktop.

This doesn't appear to be a StartsOnDesk problem because (1) if I have
no current xemacs frames and I create one it appears on the current
desktop, (2) if I have one xemacs frame on desktop N, a new frame will
always appear on desktop N, no matter what N is. If I have multiple
xemacs frames already created on multiple desktops, a new frame will
always appear on one of those desktops - I haven't quite figured out
the logic as to where, but it seems to be consistantly with a certain
existing frame until I destroy it, then it shifts to another frame.

I have no StartsOnDesk for xemacs in my .fvwmrc2.

The only similar bug I found in the list archives was that xemacs 21.1.7
created new frames with the name 'shell' initially and that caused
StartsonDesk to map it unexpectedly. But that bug appears to be fixed in
21.1.8 (which is what I'm running).

So, anyone have any advice?

Thanks,

Von

p.s. - I'm running:

[FVWM][main]:  Fvwm Version 2.2 compiled on Apr  9 1999 at 16:15:38

XEmacs 21.1 (patch 8) "Bryce Canyon" [Lucid] (i686-pc-linux) of Tue Feb  1 2000 on cerberos2.ncsa.uiuc.edu

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 10 Feb 2000 05:45:17 +0100

> So, anyone have any advice?

You could set up FvwmEvent to move newly created Xemacs windows
to the current desk.  I don't have the correct syntax handy
right now, but let FvwmEvent execute something like

  Current (emacs*) movetodesk ...

when new windows are mapped.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
The adjuration to be "normal" seems shockingly repellent to me; I see neither
hope nor comfort in sinking to that low level.  I think it is ignorance that
makes people think of abnormality only with horror and allows them to remain
undismayed at the proximity of "normal" to average and mediocre.  For surely
anyone who achieves anything is, essentially, abnormal.
                -- Dr. Karl Menninger, "The Human Mind", 1930

---

From: Von Welch <[email-masked]>
Date: Fri, 11 Feb 2000 09:21:09 -0600

> when new windows are mapped.

I don't believe this will actually work without hacking FvwmEvent.
As far as I can tell, by both experimentation and looking at the
source, *FvwmEvent and *FvwmEvent both only take a single whitespace
delimited token for command and action, so the most you can have is
two words in any given command.

In other words, with the following everything after "Current" is
discarded by FvwmEvent:

*FvwmEvent add_window Current (emacs*) MoveToDesk 0

I don't believe it would be difficult to modify FvwmEvent.c so
that it uses the whole string instead of just the next token,
however I also have the problem that the xemacs frames don't receive
focus automatically. I understand the 2.3.x fvwm2 has GrabFocus, but
I haven't found any way in 2.2.x to achieve this yet.

Von

---

From: Dan Espen <[email-masked]>
Date: Fri, 11 Feb 2000 10:30:14 -0500

> *FvwmEvent add_window Current (emacs*) MoveToDesk 0

Try:

*FvwmEvent add_window "Current (emacs*) MoveToDesk 0"

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Thomas A. Gardiner" <[email-masked]>
Date: Fri, 11 Feb 2000 10:35:05 -0500 (EST)

Hi,

Others on this list would certainly know better than I, but you should be
able to do this either by using quotes or by making another function which
is executed by FvwmEvent.  For example, what about doing the same thing
which is done to get FvwmEvent to handle playing audio.

Tom

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 11 Feb 2000 17:23:12 +0100

> I haven't found any way in 2.2.x to achieve this yet.

You can make the XEmacs windows 'ClickToFocus'.  Then they will
receive focus as soon as they are mapped.

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Von Welch <[email-masked]>
Date: Fri, 11 Feb 2000 13:28:02 -0600

Many thanks to those who pointed out that I could quote the event string
or use a function. Both methods seem to work.

The one other thing I had to figure out that Current doesn't
recognize the added window as the current window (even with
ClickToFocus in the Style).

For now I've replaced "Current (emacs*)" with "Next (emacs*)" and
it seems to work (though I won't be surprised if at some point it
grabs the wrong xemacs frame).

Anyways here is the solution I'm using in case anyone is interested
now or in the future:

# Start FvwmEvent at some point...

# This is needed so we don't change desktop when the frame appears
Style "emacs*"		SkipMapping

# If I use Current here instead of Next nothing happens
# If I remove the "Next (emacs*)" then all new windows
# get moved to the current desk
AddToFunc AddWindowFunc	"I" Next (emacs*) MoveToDesk 0

*FvwmEvent add_window AddWindowFunc

Thanks to all!

Von

---

From: "Olivier F. Beauchemin" <[email-masked]>
Date: Fri, 11 Feb 2000 14:34:22 -0500 (EST)

Hello.

I'd like to use these two modules, however, it won't seem to work under:

fvwm2 -version
[FVWM][main]:  Fvwm Version 2.1.7 compiled on Feb 10 2000 at 17:01:21

Is this even possible?  If so, what should I add to my .fvwm2rc file?  If
not, is there any chance that a developer would add this?

Thanks.
Olivier

---

From: Dan Espen <[email-masked]>
Date: Fri, 11 Feb 2000 14:51:03 -0500

> not, is there any chance that a developer would add this?

FvwmAnimate and FvwmWinList only work together in the latest betas.
You would need to install all of fvwm.  The modules certainly won't
work with fvwm 2.1.7.

The man pages describe what you need to do.

---

From: "Olivier F. Beauchemin" <[email-masked]>
Date: Fri, 11 Feb 2000 14:59:25 -0500 (EST)

> You would need to install all of fvwm.  The modules certainly won't

Ok. I may do this anyway. I did discover that Animate will work with
FvwmIconMan... similar in functionality.

> The man pages describe what you need to do.

Hrm. Yeah. I believe in RTFM too.  ;-)

Thanks.
Olivier