[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacsclient frame reuse
From: |
A.Politz |
Subject: |
Re: emacsclient frame reuse |
Date: |
Tue, 4 Aug 2009 15:18:59 -0700 (PDT) |
User-agent: |
G2/1.0 |
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.