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: Amirouche
Subject: bug#15228: making open-process public
Date: Sun, 5 Mar 2017 21:41:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Sorry I have an issue with my mail I can't find the mail where you asked for a patch.

Attached to this mail my very first patch.


Le 03/09/2016 à 09:33, Amirouche Boubekki a écrit :
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?




Attachment: 0002-make-open-process-public-in-ice-9-popen.patch
Description: Text Data

Attachment: 0001-whitespace-cleanup.patch
Description: Text Data


reply via email to

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