Up |
|
|
  |
Author: Richard G RileyRichard G Riley Date: Aug 6, 2008 22:36
Can someone recommend the best way to have emacs come to the foreground
on a Linux desktop? I'm trying to get emacsclient wired up properly so I
can handle mailto URLS from iceweasel (firefox) properly. I have tried:
,----
| /usr/bin/emacsclient -e "(progn (raise-frame)(message-mail (substring \"$1\" 7) \"Subject\" '((\"from\" \"Richard Rileygmail.com>\"))))"
`----
But raise-frame does not seem to work on my Gnome desktop.
Replacing raise-frame with (bring-on-top)
where
,----
| (defun bring-on-top()
| (interactive)
| (x-send-client-message
| nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_FULLSCREEN" 1))
| )
`----
Does work but removes the WM border from the emacs frame.
Does anyone have a cleaner solution?
regards
|
| Show full article (0.78Kb) |
|
| | 11 Comments |
|
  |
|
|
  |
Author: Joost KremersJoost Kremers Date: Aug 7, 2008 02:41
Richard G Riley wrote:
> But raise-frame does not seem to work on my Gnome desktop.
IIUC an app can only request to be raised, it's up to the window manager to
decide wether to honour that request or not. so you'll need to find where
in gnome this can be configured. (i run xfce, so i can't help you there...)
--
Joost Kremers joostkremers@ yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
|
| |
| no comments |
|
  |
Author: Andrea VettorelloAndrea Vettorello Date: Aug 7, 2008 04:01
On Thu, Aug 7, 2008 at 7:36 AM, Richard G Riley gmail.com> wrote:
>
> Can someone recommend the best way to have emacs come to the foreground
> on a Linux desktop? I'm trying to get emacsclient wired up properly so I
> can handle mailto URLS from iceweasel (firefox) properly. I have tried:
>
> ,----
> | /usr/bin/emacsclient -e "(progn (raise-frame)(message-mail (substring \"$1\" 7) \"Subject\" '((\"from\" \"Richard Rileygmail.com>\"))))"
> `----
>
> But raise-frame does not seem to work on my Gnome desktop.
>
> Replacing raise-frame with (bring-on-top)
>
> where
>
> ,----
> | (defun bring-on-top()
> | (interactive)
> | (x-send-client-message ...
|
| Show full article (1.34Kb) |
| no comments |
|
  |
Author: Richard G RileyRichard G Riley Date: Aug 7, 2008 07:33
"Andrea Vettorello" gmail.com> writes:
> On Thu, Aug 7, 2008 at 7:36 AM, Richard G Riley gmail.com> wrote:
>>
>> Can someone recommend the best way to have emacs come to the foreground
>> on a Linux desktop? I'm trying to get emacsclient...
|
| Show full article (1.58Kb) |
| no comments |
|
  |
Author: Chris GiroirChris Giroir Date: Aug 7, 2008 04:52
> Does anyone have a cleaner solution?
>
> regards
>
> r.
|
| |
| no comments |
|
  |
Author: Richard G RileyRichard G Riley Date: Aug 7, 2008 07:53
"Chris Giroir" valefor.com> writes:
>> Does anyone have a cleaner solution?
>>
>> regards
>>
>> r.
I use emacsclient here : there are no new windows created afaik.
|
| |
| no comments |
|
  |
Author: Andrea VettorelloAndrea Vettorello Date: Aug 7, 2008 10:33
On Thu, Aug 7, 2008 at 4:33 PM, Richard G Riley gmail.com> wrote:
> "Andrea Vettorello" gmail.com> writes:
>
>> On Thu, Aug 7, 2008 at 7:36 AM, Richard G Riley gmail.com> wrote:
[...]
.
>>
>> Metacity, the default Gnome window manager, tries to "avoid focus
>> stealing" (I think this blog post explains its behaviour:
>> http://blogs.gnome.org/metacity/2007/12/24/stacking/ ), IIRC there
>> should be a gconf setting to tweak it but I'm not completely sure as I
>> don't use it...
>
> The thing is that other email clients come to the fg just
> fine via the mailto click. I'll dig around some more and maybe ask in
> the gtk+ irc channel.
>
|
| Show full article (1.00Kb) |
| no comments |
|
  |
Date: Aug 7, 2008 14:47
Richard G Riley gmail.com> writes:
[...]
> I use emacsclient here : there are no new windows created afaik.
That depends on configuration. (I have emacs configured so that
emacsclient always creates a new frame.)
|
| |
| no comments |
|
  |
|
|
  |
Author: Ian SwainsonIan Swainson Date: Aug 7, 2008 18:31
On Thursday 07 August 2008 at 05:36 PM, Richard G Riley gmail.com> wrote:
> Can someone recommend the best way to have emacs come to the foreground
> on a Linux desktop?
I use wmctrl with a little script that I bind to a key combination which
either brings the app to the foreground or starts it if it is not running:
#!/bin/sh
###
# Switch to a screen or do something
###
if ! wmctrl -a $1; then $2; fi
I save this as switchto and then:
switchto "Mozilla Firefox" "firefox"
Perhaps wmctrl could be used in the same way for emacs?
Cheers,
ian
--
Ian Swainson
|
| Show full article (0.76Kb) |
| no comments |
|
RELATED THREADS |
  |
|
|
|
|