all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: implement "emacsclient -nw"
Date: Sun, 07 Sep 2008 03:55:48 -0700	[thread overview]
Message-ID: <200809071055.m87AtmMr016726@sallyv1.ics.uci.edu> (raw)


One of the TODO items for emacsclient is to accept `-nw' as a synonym to `-t' 
for consistency with emacs, which uses `-nw'.

The patch below does that.  It has the drawback that it also accepts
`--nw', but that does not seem to be a big deal.

Can someone that is familiar with getopt say if this patch is an
acceptable solution?  I'll update the docs if this patch gets checked in.

--- emacsclient.c.~1.130.~	2008-07-31 00:46:04.000000000 -0700
+++ emacsclient.c	2008-09-07 03:35:36.000000000 -0700
@@ -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\




             reply	other threads:[~2008-09-07 10:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-07 10:55 Dan Nicolaescu [this message]
2008-09-07 19:42 ` implement "emacsclient -nw" Stefan Monnier
2008-09-08  5:05   ` Dan Nicolaescu
2008-09-08 13:05     ` Stefan Monnier
2008-10-07 16:34       ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200809071055.m87AtmMr016726@sallyv1.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.