From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"' Date: Tue, 18 Nov 2008 10:17:43 -0800 (PST) Message-ID: <200811181817.mAIIHhEf001001@mothra.ics.uci.edu> References: <200811021818.mA2IIFMq028772@mothra.ics.uci.edu> <200811180822.mAI8MX0n029841@mothra.ics.uci.edu> Reply-To: Dan Nicolaescu , 1298@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227033058 31422 80.91.229.12 (18 Nov 2008 18:30:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Nov 2008 18:30:58 +0000 (UTC) Cc: 1298@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 18 19:31:58 2008 Return-path: Envelope-to: geb-bug-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 1L2VMU-000687-Fw for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Nov 2008 19:31:42 +0100 Original-Received: from localhost ([127.0.0.1]:39861 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2VLL-0005zt-Tu for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Nov 2008 13:30:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2VL8-0005vv-FH for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 13:30:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2VL7-0005vK-Dd for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 13:30:17 -0500 Original-Received: from [199.232.76.173] (port=48719 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2VL7-0005vG-9r for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 13:30:17 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:48048) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L2VL6-0003Pb-Qi for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 13:30:17 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAIIU9rY005532; Tue, 18 Nov 2008 10:30:09 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAIIP4Rg003908; Tue, 18 Nov 2008 10:25:04 -0800 X-Loop: don@donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 18 Nov 2008 18:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1298 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1298-submit@emacsbugs.donarmstrong.com id=B1298.12270322772531 (code B ref 1298); Tue, 18 Nov 2008 18:25:04 +0000 Original-Received: (at 1298) by emacsbugs.donarmstrong.com; 18 Nov 2008 18:17:57 +0000 Original-Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAIIHtiW002525 for <1298@emacsbugs.donarmstrong.com>; Tue, 18 Nov 2008 10:17:56 -0800 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mAIIHhhN016807; Tue, 18 Nov 2008 10:17:43 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mAIIHhEf001001; Tue, 18 Nov 2008 10:17:43 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Tue, 18 Nov 2008 11:36:43 -0500") Original-Lines: 20 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mAIIHhhN016807 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 18 Nov 2008 13:30:17 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22475 Archived-At: Stefan Monnier writes: > >> It would be nice if some equivalent of: > >> 'emacsclient -a "emacs --daemon && emacsclient -c" > >> would work. > >> That would allow one to ALWAYS use emacsclient. > > > Here's a quick hack that allows: > > emacsclient -a "emacs --daemon && emacsclient -c" FILENAME > > to work. It is not complete yet, FILENAME does not get passed to the > > "&& emacsclient" > > Here's an alternative: > > [ "$(emacsclient -e "'up" 2>/dev/null)" = "up" ] || emacs --daemon > emacsclient -c FILENAME I've been using something similar for a long time (even before --daemon), but it seems that it's more elegant to use a single command that shell hackery...