Alexander Kriegisch <[EMAIL PROTECTED]> wrote:

>Is there some kind of quintessence or bottom line of this thread? Can I
>simply make it work the way I like to? I.e. can I achieve the behaviour
>that calling "scite myfile" from the shell will actually reliably
>activate and front the already opened SciTE instance? Can I achive it
>via configuration? Do I need a patch? If so, where can I find it?
>

Summary: there will soon be a patch, that will fix some issues about
bringing SciTE to the front, and I think Neil will patch the source.
(If you're really unwilling to wait, send me a private email, and I'll
give you what you need, but there are some issues right now).

To answer your questions: it will not be possible to front SciTE using
the command line. That's determined by the window-manager (I assume
you're using Metacity, since you're using Gnome), which tries to avoid
windows presenting themselves in front of what you're doing*. It will work
however, if you open a file in SciTE from within Nautilus, and work the
smart way: if you open the file and don't do anything, SciTE is fronted.
if you open the file, and do something (say, you select another file)
before SciTE is ready, it won't be fronted, but will flash in the taskbar.

Obviously the other answers are: no (no configuration), no (no patch yet).

If you want to activate SciTE from within a virtual terminal, take a look
at wmctrl [1]. I don't know which distribution you're using, but it's
probably in the repositories. You could then have a little script,
something like:

#!/bin/sh
SciTE "$@" &
wmctrl -a SciTE

Just tested it, seems to work. I'm going to assume you know what to do
with this shell script, if you don't, say so and I'll explain.

Regards,
Nicolas

[1] http://www.sweb.cz/tripie/utils/wmctrl/


* For those interested, here's what I wrote in an email on the thread
Neil linked to:

"As Neil mentionned in a previous email, we should be careful
about [bringing SciTE to the front]. Activating (the word X uses
for that, i.e. giving a window the focus and raising it above the 
others) can be really annoying for a user, for example if a window 
is suddenly activated while we were doing something else.

To avoid that, we have to use timestamps. [...] The window 
manager will then decide whether to front the window or not, 
depending [on] whether the user activated another window since [the
action causing activation, e.g. opening a file]. If [the window
manager] doesn't activate the window, it might give an indication that
the window asked to be fronted (e.g. in Gnome, using Metacity, the
button will flash in the task bar)."

In the case of calling SciTE from a shell, we are not given a timestamp,
which means the window won't be fronted.

See:
http://mailman.lyra.org/pipermail/scite-interest/2007-July/009455.html
http://mailman.lyra.org/pipermail/scite-interest/2007-July/009456.html

_______________________________________________
Scite-interest mailing list
Scite-interest@lyra.org
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to