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#1152: emacsclient should support the "-nw" flag Date: Sun, 12 Oct 2008 18:36:44 -0700 (PDT) Message-ID: <200810130136.m9D1ahgF000541@mothra.ics.uci.edu> Reply-To: Dan Nicolaescu , 1152@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 1223862617 3843 80.91.229.12 (13 Oct 2008 01:50:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Oct 2008 01:50:17 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 13 03:51:16 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 1KpCaX-000278-Lu for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Oct 2008 03:51:13 +0200 Original-Received: from localhost ([127.0.0.1]:45549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpCZT-0004TI-Dl for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Oct 2008 21:50:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpCZO-0004QD-S9 for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2008 21:50:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpCZN-0004O6-Jt for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2008 21:50:01 -0400 Original-Received: from [199.232.76.173] (port=36252 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpCZN-0004Nv-C8 for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2008 21:50:01 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37252) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KpCZN-0003if-Ce for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2008 21:50:01 -0400 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 m9D1nws5018356; Sun, 12 Oct 2008 18:49:58 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9D1j3X4017239; Sun, 12 Oct 2008 18:45:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 13 Oct 2008 01:45:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1152 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122386181616004 (code B ref -1); Mon, 13 Oct 2008 01:45:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 13 Oct 2008 01:36:56 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9D1arnT015998 for ; Sun, 12 Oct 2008 18:36:54 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpCMf-0007nr-Cr for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2008 21:36:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpCMc-0007nf-UO for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2008 21:36:52 -0400 Original-Received: from [199.232.76.173] (port=42884 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpCMc-0007nc-Oi for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2008 21:36:50 -0400 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:43811) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1KpCMc-0002Fq-Oq for bug-gnu-emacs@gnu.org; Sun, 12 Oct 2008 21:36:51 -0400 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 m9D1aiVs002398 for ; Sun, 12 Oct 2008 18:36:44 -0700 (PDT) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id m9D1ahgF000541; Sun, 12 Oct 2008 18:36:44 -0700 (PDT) Original-Lines: 39 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: m9D1aiVs002398 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: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 12 Oct 2008 21:50:01 -0400 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:21427 Archived-At: emacsclient should support the "-nw" flag (as an equivalent to "-t") for consistency with emacs. The attached patch implements this. Index: emacsclient.c =================================================================== RCS file: /cvsroot/emacs/emacs/lib-src/emacsclient.c,v retrieving revision 1.132 diff -u -3 -p -u -p -r1.132 emacsclient.c --- emacsclient.c 19 Sep 2008 16:45:12 -0000 1.132 +++ emacsclient.c 13 Oct 2008 01:34:25 -0000 @@ -156,6 +156,7 @@ struct option longopts[] = { "help", no_argument, NULL, 'H' }, { "version", no_argument, NULL, 'V' }, { "tty", no_argument, NULL, 't' }, + { "nw", no_argument, NULL, 't' }, { "create-frame", no_argument, NULL, 'c' }, { "alternate-editor", required_argument, NULL, 'a' }, #ifndef NO_SOCKETS_IN_FILE_SYSTEM @@ -474,7 +475,7 @@ decode_options (argc, argv) while (1) { - int opt = getopt_long (argc, argv, + int opt = getopt_long_only (argc, argv, #ifndef NO_SOCKETS_IN_FILE_SYSTEM "VHnea:s:f:d:tc", #else @@ -601,7 +602,7 @@ Every FILE can be either just a FILENAME The following OPTIONS are accepted:\n\ -V, --version Just print version info and return\n\ -H, --help Print this usage information message\n\ --t, --tty Open a new Emacs frame on the current terminal\n\ +-nw, -t, --tty Open a new Emacs frame on the current terminal\n\ -c, --create-frame Create a new frame instead of trying to\n\ use the current Emacs frame\n\ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\