unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* implement "emacsclient -nw"
@ 2008-09-07 10:55 Dan Nicolaescu
  2008-09-07 19:42 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Nicolaescu @ 2008-09-07 10:55 UTC (permalink / raw)
  To: emacs-devel


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\




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-07 16:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-07 10:55 implement "emacsclient -nw" Dan Nicolaescu
2008-09-07 19:42 ` Stefan Monnier
2008-09-08  5:05   ` Dan Nicolaescu
2008-09-08 13:05     ` Stefan Monnier
2008-10-07 16:34       ` Dan Nicolaescu

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).