unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Amirouche Boubekki <amirouche@hypermove.net>
To: 15228@debbugs.gnu.org
Subject: bug#15228: making open-process public
Date: Sat, 03 Sep 2016 09:33:32 +0200	[thread overview]
Message-ID: <145cea679b38ca9de4e8b1c9f2213622@hypermove.net> (raw)
In-Reply-To: <1377937797.2030.5.camel@qwghlm>

Wingo wrote:

> We could just expose `open-process' from (ice-9 popen) to start with.

AFAIK, that's what Mark wants.

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?





  parent reply	other threads:[~2016-09-03  7:33 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 ` Amirouche Boubekki [this message]
2017-02-28  9:58   ` bug#15228: making open-process public Andy Wingo
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=145cea679b38ca9de4e8b1c9f2213622@hypermove.net \
    --to=amirouche@hypermove.net \
    --cc=15228@debbugs.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.
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).