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

IO redirection in Elisp

is actually a nice feature but clumsy to use interactively (which is when
I want it).  So I have defined:

        Redirects output of EXPR to the named file.

        Appends output of EXPR to the named file.

        Redirects input of expr from the named file.

These encourage me to use UNIX-like redirection interactively for things like:

    * (options.set 'disp 5)
    * (} (cce solve4 solve-args) 'solve.log)

(Much faster and neater than just picking the SM log.)


    * (} (loop (incr i from 1 to 16) (do
    *       (msg 0 "(write-mis () 'b" i ".dag)" )
    *       (msg 0 "ok")
    *       (msg 0 "(write-mis () 'a" i ".dag)" )
    *       (msg 0 "ok") ) )
    *    'temp:junk.junk)
    * ({ (cce fft1 fft-args) 'temp:junk.junk)

in order to get draw all the flow graphs from a 16 trace compile.
(This second case probably just points up the need for a "movie mode" in
WRITE-MIS and WRITE-TRACE, but that's another story.)

In any case, I don't want to make a big thing out of this, cause it's not.
I've found the (iota ((... idiom too verbose for interactive use.  Replacing
it with a simple macro gave me something that I now use all the time.
I thought you'd be interested.