From: jem <jere.mcdevitt@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: emacsclient frame reuse
Date: Tue, 4 Aug 2009 17:22:13 -0700 (PDT) [thread overview]
Message-ID: <de3fc0a4-d2e1-4b23-84eb-22df639c3b64@j32g2000yqh.googlegroups.com> (raw)
In-Reply-To: e6977909-d760-4b46-b295-223d87a14fbb@t13g2000yqt.googlegroups.com
On Aug 4, 6:18 pm, "A.Politz" <poli...@googlemail.com> wrote:
> On Aug 4, 11:07 pm, jem <jere.mcdev...@gmail.com> wrote:
>
> > How can you detect if there is already a running frame with the newest
> > version?
>
> > Thanks
>
> > Jere
> > ~
>
> #!/bin/sh
>
> EMACS=emacs-23.1
> EMACSCLIENT=emacsclient-23.1
> FLAGS=-n
>
> $EMACSCLIENT -e nil >/dev/null || $EMACS --daemon
>
> NR_FRAMES=$($EMACSCLIENT -e '(1- (length (frame-list)))')
>
> if [ $NR_FRAMES -eq 0 ];then
> FLAGS="$FLAGS -c"
> fi
>
> $EMACSCLIENT $FLAGS "$@"
>
> There seems to be an invisible frame, representing the daemon or
> something.
Thanks, this works quite well.
Jere
next prev parent reply other threads:[~2009-08-05 0:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 21:07 emacsclient frame reuse jem
2009-08-04 22:18 ` A.Politz
2009-08-05 0:22 ` jem [this message]
2009-08-05 0:40 ` jem
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=de3fc0a4-d2e1-4b23-84eb-22df639c3b64@j32g2000yqh.googlegroups.com \
--to=jere.mcdevitt@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.