Hi,
Le vendredi 29 février 2008, Xavier Maillard a écrit :
In fact on my main development machine there is only Emacsclient 21 and it
outputs its version on stderr and exits with code 1. Emacsclient 21 also
does not accept "-e" option.
I just checked with Emacsclient 22 and it outputs its version on stdout and
exits with code 0. But it accepts the "-e" option.
I will need to get Emacs 23 from CVS but from what you say I guess it works
like Emacs 22.
So my "check_emacsclient_version" function works only with emacsclient 21
and may be earlier versions.
I used:
/* emacsclient prints its version number on stderr */
memset(&ec_process, 0, sizeof(ec_process));
ec_process.argv = argv_ec;
ec_process.err = -1;
ec_process.stdout_to_stderr = 1;
I hoped the above line would redirect stdout to stderr and I could read both
from "ec_process.err" below, but it seems it doesn't work like that. I also
just checked using "ec_process.stdout_to_stderr = 0;" but it still doesn't
work.
if (start_command(&ec_process)) {
fprintf(stderr, "Failed to start emacsclient.\n");
return -1;
}
strbuf_read(&buffer, ec_process.err, 20);
close(ec_process.err);
I will be offline this week end but I hope I can debug this next week.
Thanks,
Christian.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html