Re: [PATCH 1/2] help: add "man.viewer" config var to use "woman" or "konqueror"
From: Xavier Maillard <hidden>
Date: 2016-06-15 22:44:18
Hi (again),
Note that "emacsclient" is used with option "-e" to launch "woman"
on emacs and this works only on versions >= 22.
Here are more clues concerning emacsclient I found out when
trying to understand why it worked for you with >=22 and not for
me with a 23.x version.
+
+ /* emacsclient prints its version number on stderr */
As commented into another post, here the version is displayed on
stdout which is confirmed by reading the source code:
/* Display a normal or error message.
On Windows, use a message box if compiled as a Windows app. */
FILE *f = is_error ? stderr : stdout;
fputs (msg, f);
fflush (f);
is_error is a boolean parameter to the function message.
+ /*
+ * Don't bother checking return value, because "emacsclient --version"
+ * seems to always exits with code 1.
+ */
Almost, in fact, in emacsclient.c, we can read
case 'V':
message (FALSE, "emacsclient %s\n", VERSION);
exit (EXIT_SUCCESS);
break;
So it always returns 0.
Regards
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org