all messages for Emacs-related lists mirrored at yhetil.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

* Re: implement "emacsclient -nw"
  2008-09-07 10:55 implement "emacsclient -nw" Dan Nicolaescu
@ 2008-09-07 19:42 ` Stefan Monnier
  2008-09-08  5:05   ` Dan Nicolaescu
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-09-07 19:42 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

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

The more significant drawback is that it does not accept things like
"-ne" any more, so it's not backward compatible.


        Stefan




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

* Re: implement "emacsclient -nw"
  2008-09-07 19:42 ` Stefan Monnier
@ 2008-09-08  5:05   ` Dan Nicolaescu
  2008-09-08 13:05     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Nicolaescu @ 2008-09-08  5:05 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > > The patch below does that.  It has the drawback that it also accepts
  > > `--nw', but that does not seem to be a big deal.
  > 
  > The more significant drawback is that it does not accept things like
  > "-ne" any more, so it's not backward compatible.

Are you sure?  "-ne" seems to work just fine for me... 




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

* Re: implement "emacsclient -nw"
  2008-09-08  5:05   ` Dan Nicolaescu
@ 2008-09-08 13:05     ` Stefan Monnier
  2008-10-07 16:34       ` Dan Nicolaescu
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-09-08 13:05 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

>> > The patch below does that.  It has the drawback that it also accepts
>> > `--nw', but that does not seem to be a big deal.
>> The more significant drawback is that it does not accept things like
>> "-ne" any more, so it's not backward compatible.
> Are you sure?  "-ne" seems to work just fine for me... 

Hmm... I'll have to try it out again (I tried out a very similar
patch when I looked at this problem),


        Stefan




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

* Re: implement "emacsclient -nw"
  2008-09-08 13:05     ` Stefan Monnier
@ 2008-10-07 16:34       ` Dan Nicolaescu
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Nicolaescu @ 2008-10-07 16:34 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > >> > The patch below does that.  It has the drawback that it also accepts
  > >> > `--nw', but that does not seem to be a big deal.
  > >> The more significant drawback is that it does not accept things like
  > >> "-ne" any more, so it's not backward compatible.
  > > Are you sure?  "-ne" seems to work just fine for me... 
  > 
  > Hmm... I'll have to try it out again (I tried out a very similar
  > patch when I looked at this problem),

Any news about this?
May I check in the patch?


Thanks
        
        --dan




^ 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 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.