public inbox for guile-emacs@sourceware.org
 help / color / mirror / Atom feed
From: Kalle Olavi Niemitalo <tosi@stekt.oulu.fi>
To: Keisuke Nishida <kxn30@po.cwru.edu>
Cc: guile-emacs@sourceware.cygnus.com
Subject: Re: New module (emacs io)
Date: Mon, 27 Mar 2000 09:08:00 -0000	[thread overview]
Message-ID: <87k8ioxysi.fsf@PC486.Niemitalo.LAN> (raw)
In-Reply-To: <m3g0tdblek.fsf@kei.cwru.edu>

Keisuke Nishida <kxn30@po.cwru.edu> writes:

> I think it is not necessary but this module should be optional;
> the user should be able to choose whether or not to use it.

Do you mean the default output port should be `emacs-port' in
modules which use (emacs io), and stdout in others?  I don't know
how that could be done.

In the current Guile Emacs, the (emacs io) module is loaded when
it is first used, and at that moment the default ports change in
all modules.  This is quite bad.  I see two ways around it:

a) Always load (emacs io), and do that as early as possible.
   Then there won't be a sudden change later.

b) Do not change ports when loading (emacs io).  Anything that
   wants to read or write through Emacs, must do something like:

     (use-modules (emacs io))
     (with-output-to-port emacs-port
       (lambda ()
         (display "This goes to Emacs.")
	 (newline)))

Which alternative do you prefer?

> (I sometimes used display to the terminal for debugging...)

You could do that even if (emacs io) were always loaded:

(use-modules (emacs io))
(with-output-to-port terminal-output-port
  (lambda ()	
    (let ((esc (string #\esc)))
      (display (string-append esc "[32m"
                              "This goes straight to the terminal."
	                      esc "[m")))))

> We will turn this to the default some time later on.

I think it would be easier to do that now.

  reply	other threads:[~2000-03-27  9:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-23  2:08 Kalle Olavi Niemitalo
2000-03-26 11:07 ` Keisuke Nishida
2000-03-27  9:08   ` Kalle Olavi Niemitalo [this message]
2000-03-27 17:48     ` Keisuke Nishida

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k8ioxysi.fsf@PC486.Niemitalo.LAN \
    --to=tosi@stekt.oulu.fi \
    --cc=guile-emacs@sourceware.cygnus.com \
    --cc=kxn30@po.cwru.edu \
    /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).