[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"'
From: |
Eli Zaretskii |
Subject: |
bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"' |
Date: |
Tue, 18 Nov 2008 21:43:13 +0200 |
> Date: Tue, 18 Nov 2008 00:22:33 -0800 (PST)
> From: Dan Nicolaescu <dann@ics.uci.edu>
> Cc:
>
> --- emacsclient.c.~1.140.~ 2008-11-03 06:30:13.000000000 -0800
> +++ emacsclient.c 2008-11-18 00:13:29.000000000 -0800
> @@ -630,8 +630,13 @@ fail (void)
> if (alternate_editor)
> {
> int i = optind - 1;
> + char * new_argv[] = { "sh", "-c", 0, 0 };
>
> - execvp (alternate_editor, main_argv + i);
> + new_argv[0] = "sh";
> + new_argv[1] = "-c";
> + new_argv[2] = alternate_editor;
> +
> + execve ("/bin/sh", new_argv, environ);
> message (TRUE, "%s: error executing alternate editor \"%s\"\n",
> progname, alternate_editor);
> }
>
>
> Thoughts?
Won't work on platforms that don't have /bin/sh.
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Dan Nicolaescu, 2008/11/02
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Dan Nicolaescu, 2008/11/18
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Stefan Monnier, 2008/11/18
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Dan Nicolaescu, 2008/11/18
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Stefan Monnier, 2008/11/18
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Dan Nicolaescu, 2008/11/18
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Andreas Schwab, 2008/11/18
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Stefan Monnier, 2008/11/18
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Dan Nicolaescu, 2008/11/18
- bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"', Stefan Monnier, 2008/11/18
bug#1298: allow 'emacsclient -a "emacs --daemon && emacsclient -c"',
Eli Zaretskii <=