help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacsclient does not raise frame


From: Rusi
Subject: Re: Emacsclient does not raise frame
Date: Sun, 31 Dec 2017 20:05:48 -0800 (PST)
User-agent: G2/1.0

On Sunday, December 31, 2017 at 9:03:41 PM UTC+5:30, Rusi wrote:
> With a lot of jumping through hoops Ive managed to get firefox to
> call emacs(client) and save links+description(title)+selection(in firefox; 
> optional) into an org mode capture buffer.
> 
> However the call to emacsclient does not raise the frame... At least not 
> consistently
> 
> Currently my hack is to write my own shell wrapper to emacsclient doing
> 
> wmctrl -c emacs
> emacsclient -c $*
> wmctrl -a emacs
> 
> Is there some other thing I dont know to raise the emacs frame?
> 
> Also the -c I am forced to use because without it, if there is not an existing
> frame (emacs started in --daemon mode) it does not work
> 
> 
> Emacs 25.1.1
> Gnome-Unity

Best Ive come to is this (my wrapper of emacsclient)

#!/bin/bash
if wmctrl -a emacs;  then
    emacsclient -n $*
else
    emacsclient -n -c $*
fi

There really needs to be an emacsclient option for this:
Because currently if
- emacs is started as --daemon
- emacsclient is started without -c

It tries to open non-GUI emacs
So it works if the client is run from a shell
And fails if started from another script (in my case firefox)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]