From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#15228: making open-process public Date: Tue, 28 Feb 2017 10:58:18 +0100 Message-ID: <87bmtmprgl.fsf@pobox.com> References: <1377937797.2030.5.camel@qwghlm> <145cea679b38ca9de4e8b1c9f2213622@hypermove.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488275957 1757 195.159.176.226 (28 Feb 2017 09:59:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Feb 2017 09:59:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 15228@debbugs.gnu.org To: Amirouche Boubekki Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Feb 28 10:59:11 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cieYj-0007rh-9Y for guile-bugs@m.gmane.org; Tue, 28 Feb 2017 10:59:05 +0100 Original-Received: from localhost ([::1]:59826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cieYp-0004CM-8R for guile-bugs@m.gmane.org; Tue, 28 Feb 2017 04:59:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cieYk-0004CD-7C for bug-guile@gnu.org; Tue, 28 Feb 2017 04:59:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cieYg-00026C-Ek for bug-guile@gnu.org; Tue, 28 Feb 2017 04:59:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60877) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cieYg-000267-Au for bug-guile@gnu.org; Tue, 28 Feb 2017 04:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cieYg-0008Fi-1j for bug-guile@gnu.org; Tue, 28 Feb 2017 04:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 28 Feb 2017 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15228 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 15228-submit@debbugs.gnu.org id=B15228.148827591131675 (code B ref 15228); Tue, 28 Feb 2017 09:59:01 +0000 Original-Received: (at 15228) by debbugs.gnu.org; 28 Feb 2017 09:58:31 +0000 Original-Received: from localhost ([127.0.0.1]:59076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cieYA-0008Eo-V4 for submit@debbugs.gnu.org; Tue, 28 Feb 2017 04:58:31 -0500 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:64881 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cieY9-0008Ee-Dr for 15228@debbugs.gnu.org; Tue, 28 Feb 2017 04:58:29 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 22C4B5F864; Tue, 28 Feb 2017 04:58:27 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=upo6c4N4TneJCx5dIjIgx2DiGUQ=; b=tWtTnS 9S6+e/mz+MKbMoSfX0AGjDRwDmIwjA7AeiZHw4JyOCGOWEMMh6R5ryFy5drJmGHy v3u5s6kMthXO3zhsT4Onld7srQOeahRd/P97S1gTgD/J2Z7YRgt/A9P8+4sc5Pu5 O0rYlVVektjeedKab+sxd2YkqWIQLUI7fyFAk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=ff4SU9CNcYIQvMIKq/yH2CDXYr44Kdh5 ygouFtZZWgPc+9BptLT84iVNACUilSR5PVKK9ObIEhhqYIS0oqyg3CyQH1J23VjW HI4Oq15LEUP816IWFADsxhK56C6jXYfe1jBS5WGnkxAwF6mA0wqanjn1PBFVJH42 7P9T4Zhy2IY= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 1ADFF5F863; Tue, 28 Feb 2017 04:58:27 -0500 (EST) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 1DF615F861; Tue, 28 Feb 2017 04:58:26 -0500 (EST) In-Reply-To: <145cea679b38ca9de4e8b1c9f2213622@hypermove.net> (Amirouche Boubekki's message of "Sat, 03 Sep 2016 09:33:32 +0200") X-Pobox-Relay-ID: 72CCD4BE-FD9C-11E6-9DB4-CDEC6462E9F6-02397024!pb-sasl1.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8576 Archived-At: On Sat 03 Sep 2016 09:33, Amirouche Boubekki writes: >> We could just expose `open-process' from (ice-9 popen) to start with. > > Here is an example use of `open-process' to wrap `html2text': > > > (use-modules (ice-9 popen)) > > (define open-process (@@ (ice-9 popen) open-process)) > > (define (html2text string) > (with-error-to-file "/dev/null" > (lambda () > (call-with-values (lambda () (open-process OPEN_BOTH > "html2text")) > (lambda (read-port write-port pid) > (display string write-port) > (close-port write-port) > (let ((str (read-string read-port))) > (close-port read-port) > (waitpid pid) > str)))))) > > IIUC to achieve this goal, I need to make `open-process' public > in `ice-9 popen` module and add documentation for it? > > Is that correct? Yep! Let's just do this. Would you mind sending a patch. Andy