From: Andy Wingo <wingo@pobox.com>
To: Amirouche Boubekki <amirouche@hypermove.net>
Cc: 15228@debbugs.gnu.org
Subject: bug#15228: making open-process public
Date: Tue, 28 Feb 2017 10:58:18 +0100 [thread overview]
Message-ID: <87bmtmprgl.fsf@pobox.com> (raw)
In-Reply-To: <145cea679b38ca9de4e8b1c9f2213622@hypermove.net> (Amirouche Boubekki's message of "Sat, 03 Sep 2016 09:33:32 +0200")
On Sat 03 Sep 2016 09:33, Amirouche Boubekki <amirouche@hypermove.net> 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
next prev parent reply other threads:[~2017-02-28 9:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-31 8:29 bug#15228: [PATCH] Close output port of I/O pipes Josep Portella Florit
2016-06-21 10:47 ` Andy Wingo
2016-09-03 7:33 ` bug#15228: making open-process public Amirouche Boubekki
2017-02-28 9:58 ` Andy Wingo [this message]
2017-03-05 20:41 ` Amirouche
2021-06-02 5:45 ` bug#15228: can this be closed ? Adriano Peluso
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: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bmtmprgl.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=15228@debbugs.gnu.org \
--cc=amirouche@hypermove.net \
/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.
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).