all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rusi <rustompmody@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacsclient does not raise frame
Date: Sun, 31 Dec 2017 20:05:48 -0800 (PST)	[thread overview]
Message-ID: <c3728956-7d6d-46f5-b243-f03c128937f2@googlegroups.com> (raw)
In-Reply-To: <db4fca19-54dc-4396-9245-92ced4e66adc@googlegroups.com>

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	other threads:[~2018-01-01  4:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-31 15:33 Emacsclient does not raise frame Rusi
2018-01-01  4:05 ` Rusi [this message]
2018-01-03 11:55   ` Andrew Savonichev
     [not found]   ` <mailman.6761.1514980510.27995.help-gnu-emacs@gnu.org>
2018-01-03 12:13     ` Rusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c3728956-7d6d-46f5-b243-f03c128937f2@googlegroups.com \
    --to=rustompmody@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.