[gambit-list] forcing output-port-width
Marc Feeley
feeley at iro.umontreal.ca
Sat Mar 14 20:24:41 EDT 2009
On 14-Mar-09, at 7:22 PM, |/|/ Bendick wrote:
> Is there a way to force gambit to think the output port width is some
> particular number? I'm asking because gambit gets it wrong in emacs,
> and the gambit debugger seems to truncate lines at the output port
> width, so I'd like to fix it even if it's just a hack to get the right
> behavior in my emacs session.
Here's a hack...
> (define (output-port-width-set! port width)
(##vector-set! port 35 (lambda (port) width))
(void))
> (output-port-width-set! (repl-output-port) 20)
> (pp output-port-width-set!)
(lambda (port
width)
(##vector-set!
port
35
(lambda (port)
width))
(void))
> (output-port-width-set! (repl-output-port) 80)
> (pp output-port-width-set!)
(lambda (port width) (##vector-set! port 35 (lambda (port) width))
(void))
The procedure at index 35 could do something fancier of course, like
contacting emacs with a custom protocol.
Marc
More information about the Gambit-list
mailing list