From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: Emacsclient does not raise frame Date: Sun, 31 Dec 2017 20:05:48 -0800 (PST) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1514779730 2673 195.159.176.226 (1 Jan 2018 04:08:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 Jan 2018 04:08:50 +0000 (UTC) Injection-Date: Mon, 01 Jan 2018 04:05:49 +0000 User-Agent: G2/1.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 01 05:08:46 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVrOv-0008LR-S6 for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Jan 2018 05:08:37 +0100 Original-Received: from localhost ([::1]:35719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVrQu-0005gl-QZ for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 23:10:40 -0500 X-Received: by 10.200.38.16 with SMTP id u16mr29366983qtu.40.1514779549525; Sun, 31 Dec 2017 20:05:49 -0800 (PST) X-Received: by 10.31.52.197 with SMTP id b188mr3263135vka.8.1514779549147; Sun, 31 Dec 2017 20:05:49 -0800 (PST) Original-Path: usenet.stanford.edu!m31no4851296qtf.0!news-out.google.com!v55ni1556qtc.0!nntp.google.com!g35no4844223qtk.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Original-Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=117.195.48.115; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 117.195.48.115 Original-Xref: usenet.stanford.edu gnu.emacs.help:221402 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115517 Archived-At: 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)