git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] help: add "man.viewer" config var to use "woman" or "konqueror"

From
Christian Couder <chriscool@tuxfamily.org>
Date
Feb 29, 2008, 07:14 UTC
Message-ID
<200802290814.39366.chriscool@tuxfamily.org>
In-Reply-To
<200802290200.m1T2023x017992@localhost.localdomain>
Hi,
Le vendredi 29 février 2008, Xavier Maillard a écrit :
Show 9 quoted lines
> Hi,
>
>    Note that "emacsclient" is used with option "-e" to launch "woman"
>    on emacs and this works only on versions >= 22.
>
> I tested and it did not want to work at first. I modified it a
> little bit and now it works with GNU Emacs 23.0.60 (CVS TRUNK).
> Dunno if emacsclient has changed between 22 and CVS but it seems
> it is printing onto stdout now. I will have to check that.

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.

Previous: Xavier MaillardNext: Junio C Hamano
Message 3 of 12 in “help: add "man.viewer" config var to use "woman" or "konqueror"”
  1. 1/2 help: add "man.viewer" config var to use "woman" or "konqueror"Christian Couder, Feb 28, 2008
  2. Xavier MaillardFeb 29, 2008
  3. Christian CouderFeb 29, 2008
  4. Junio C HamanoFeb 29, 2008
  5. Xavier MaillardMar 1, 2008
  6. Christian CouderMar 3, 2008
  7. help: add "man.viewer" config var to use "woman" or "konqueror"Xavier Maillard, Mar 1, 2008
  8. Junio C HamanoMar 1, 2008
  9. Christian CouderMar 3, 2008
  10. Jakub NarebskiMar 3, 2008
  11. Christian CouderMar 3, 2008
  12. Xavier MaillardFeb 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.