GNU bug report logs - #1298
allow 'emacsclient -a "emacs --daemon && emacsclient -c"'

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>

Date: Sun, 2 Nov 2008 18:25:04 UTC

Severity: wishlist

Done: Dan Nicolaescu <dann <at> ics.uci.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Nicolaescu <dann <at> ics.uci.edu>, 1298 <at> debbugs.gnu.org
Cc: 1298 <at> debbugs.gnu.org, bug-submit-list <at> donarmstrong.com,
        bug-gnu-emacs <at> gnu.org
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 <at> 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.




This bug report was last modified 16 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.