From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hugo Heden Newsgroups: gmane.emacs.help Subject: Daemon and client: Only open new frame if there isn't one already? Date: Thu, 12 Mar 2009 23:52:46 +0100 Message-ID: <2bdf908c0903121552i28e1da76t8f47975f2ff820ab@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1236898403 16112 80.91.229.12 (12 Mar 2009 22:53:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Mar 2009 22:53:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 12 23:54:40 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LhtnR-00020X-En for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Mar 2009 23:54:37 +0100 Original-Received: from localhost ([127.0.0.1]:43912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lhtm5-0002mh-77 for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Mar 2009 18:53:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lhtlh-0002kQ-RZ for help-gnu-emacs@gnu.org; Thu, 12 Mar 2009 18:52:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lhtlg-0002jN-W3 for help-gnu-emacs@gnu.org; Thu, 12 Mar 2009 18:52:49 -0400 Original-Received: from [199.232.76.173] (port=32941 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lhtlg-0002jE-RU for help-gnu-emacs@gnu.org; Thu, 12 Mar 2009 18:52:48 -0400 Original-Received: from mail-fx0-f176.google.com ([209.85.220.176]:46673) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lhtlg-0008L4-7l for help-gnu-emacs@gnu.org; Thu, 12 Mar 2009 18:52:48 -0400 Original-Received: by fxm24 with SMTP id 24so2465727fxm.42 for ; Thu, 12 Mar 2009 15:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=pjJDAyHZ7DQ2Q5WYLALtFr7Wau8Nr5Urn2meRYVt6Es=; b=rIpdXp5SZzaCOi71VT1zjv74eBr2cRP0grke3BV61m5kDgaAd8/iNn8rUjVpPZtV/Z TM+RnaI38q1Rh9LWbg7ylikt/R0XAAT4neAsG17HdlmDqb3+U1bGFnpkWzO4RzOZi7z3 lq/Vg8rlbJnaViz7tBc4mERadGlVyZ+opwdmE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=kRIKHYVSF0ESQFE07bMC98sZQ+iR5m1QZYKCZSBa6FZj1Ip/V+FYIqLnoPRL1RiqxI IfYxs6hkYllviH62TzXa5BvYGpG9eVFbpKh0zG4+5x7huMyrngSvZjbbMYAI7f/vBI3e kmIeENhNgJjvcy1Wmlnf9RE1uOspn+PvU/CN4= Original-Received: by 10.86.61.13 with SMTP id j13mr285068fga.6.1236898366106; Thu, 12 Mar 2009 15:52:46 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:62863 Archived-At: Good day all, Is there a way for emacsclient to ask the daemon to make a new frame (as in window-manager-managed X GUI frame, not a terminal one) only if there isn't one already running? Presumably by using "--eval" on the commandline I guess, perhaps something like ( unless selected-frame (make-frame) ) ( find-file "myfile.txt" ) ..? When I am about to open a file (from the bash command line) I often don't remember whether I have a frame open or not.. If there is one, I would want the file to be automatically opened there, and otherwise I would want a new frame to be automatically created. Any hints appreciated. Best regards Hugo Heden -- I am using a snapshot built for Ubuntu 8.10 20090207 -- https://launchpad.net/~ubuntu-elisp/+archive/ppa $ emacs-snapshot --version GNU Emacs 23.0.90.1