From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hattuari Newsgroups: gmane.emacs.help Subject: automatic selection of emacsclient/emacs? Date: Tue, 07 Jun 2005 22:32:59 -0400 Organization: Asii Message-ID: <2cydneqEPbdzxTvfRVn-uw@speakeasy.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: sea.gmane.org 1118198051 16191 80.91.229.2 (8 Jun 2005 02:34:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2005 02:34:11 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 08 04:34:04 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DfqNh-0005i0-PL for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Jun 2005 04:33:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DfqUK-0008F5-Sb for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Jun 2005 22:40:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 07 Jun 2005 21:33:18 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.9.1 Original-Lines: 9 Original-NNTP-Posting-Host: 66.92.149.152 Original-X-Trace: sv3-MzKeLTa3bkglkfhSptJZvaMvxjTl4OpuSTeRDx3MtsjM0KMzUQjWoM7zco1CLRAOr1riHbwRa3EAAkh!0FQ47go1bBB8jehkrXHwY+PyohW5jmNpDUplhlWaf3F+bNO/LlrufqFqin5oUyv1SeqNLDKvZsem!FqasxDYn0M7jbyKNSWc= Original-X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Original-Xref: shelby.stanford.edu gnu.emacs.help:131864 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:27331 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27331 Is there a clean way to get Emacs to start as a client when there is an available server? I find it moderately annoying to have to look around to see if there is already an instance of Emacs started in order to determine if I should enter `emacs' or `emacsclient'. I much prefer running emacsclient when I already have one instance of Emacs running. One option is to try and sniff for emacs with ps and filter out the current processes such as grep emacs, and (assuming the script I'm running is also called emacs) the launch script. It would seem more correct to directly check to see if the service is available. Is there such a capability?