bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15228: making open-process public


From: Andy Wingo
Subject: bug#15228: making open-process public
Date: Tue, 28 Feb 2017 10:58:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

On Sat 03 Sep 2016 09:33, Amirouche Boubekki <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]