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 14:19:57 -0800 (PST) Message-ID: <200811182219.mAIMJv4G002062@mothra.ics.uci.edu> References: <200811021818.mA2IIFMq028772@mothra.ics.uci.edu> <200811180822.mAI8MX0n029841@mothra.ics.uci.edu> <200811181817.mAIIHhEf001001@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 1227047480 20047 80.91.229.12 (18 Nov 2008 22:31:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Nov 2008 22:31:20 +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 23:32:22 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 1L2Z7L-0006XL-4v for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Nov 2008 23:32:19 +0100 Original-Received: from localhost ([127.0.0.1]:36904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2Z6C-00042a-Is for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Nov 2008 17:31:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2Z5M-0003lU-GW for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 17:30:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2Z5K-0003kk-T1 for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 17:30:16 -0500 Original-Received: from [199.232.76.173] (port=49916 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2Z5K-0003ke-LK for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 17:30:14 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53932) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L2Z5K-0003u4-K9 for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2008 17:30:14 -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 mAIMU9ur000979; Tue, 18 Nov 2008 14:30:09 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAIMU3fK000498; Tue, 18 Nov 2008 14:30:03 -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 22:30:03 +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.122704681231244 (code B ref 1298); Tue, 18 Nov 2008 22:30:03 +0000 Original-Received: (at 1298) by emacsbugs.donarmstrong.com; 18 Nov 2008 22:20:12 +0000 Original-Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAIMK9Sj030641 for <1298@emacsbugs.donarmstrong.com>; Tue, 18 Nov 2008 14:20:10 -0800 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mAIMJwBN020255; Tue, 18 Nov 2008 14:19:58 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mAIMJv4G002062; Tue, 18 Nov 2008 14:19:57 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Tue, 18 Nov 2008 16:34:38 -0500") Original-Lines: 26 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mAIMJwBN020255 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 17:30:16 -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:22478 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... > > I think both are hacks, where my hack has the advantage of requiring no > changes to the code. If you want to change the code, than I'd rather we > do it Right. Well, now please don't tease, say what you mean by "do it Right"...