git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Xavier Maillard <xma@gnu.org>
Cc: junkio@cox.net, pascal@obry.net, nanako3@bluebottle.com,
	git@vger.kernel.org
Subject: Re: [PATCH 1/2] help: add "man.viewer" config var to use "woman" or "konqueror"
Date: Fri, 29 Feb 2008 08:14:39 +0100	[thread overview]
Message-ID: <200802290814.39366.chriscool@tuxfamily.org> (raw)
In-Reply-To: <200802290200.m1T2023x017992@localhost.localdomain>

Hi,

Le vendredi 29 février 2008, Xavier Maillard a écrit :
> 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.

  reply	other threads:[~2008-02-29  7:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-28  4:19 [PATCH 1/2] help: add "man.viewer" config var to use "woman" or "konqueror" Christian Couder
2008-02-29  2:00 ` Xavier Maillard
2008-02-29  7:14   ` Christian Couder [this message]
2008-02-29  7:46     ` Junio C Hamano
2008-03-01  1:00       ` Xavier Maillard
2008-03-03  7:20         ` Christian Couder
2008-03-01  1:00     ` [PATCH AMENDED] " Xavier Maillard
2008-03-01  2:14       ` Junio C Hamano
2008-03-03  7:38         ` Christian Couder
2008-03-03  7:42           ` Jakub Narebski
2008-03-03 19:07             ` Christian Couder
2008-02-29  2:00 ` [PATCH 1/2] " Xavier Maillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802290814.39366.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=nanako3@bluebottle.com \
    --cc=pascal@obry.net \
    --cc=xma@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).