Domanda

I open a .scm file in emacs and I tried to evaluate it in a mit-scheme inferior buffer with the Ctrl + x Ctrl + r command but, nothing happens. I followed the instructions in the "Starting Scheme in Emacs" section in the page with" http://community.schemewiki.org/?emacs-tutorial.

So when a try to evaluate something directly in the buffer running mit-scheme I see the same behavior: nothings is evaluate when I press enter key. But when I use the interpreter directly in command line works well.

My .emacs file looks like this:

;;; Always do syntax highlighting
(global-font-lock-mode 1)

;;; Also highlight parens
(setq show-paren-delay 0
      show-paren-style 'parenthesis)
(show-paren-mode 1)

;;; This is the binary name of my scheme implementation
(setq scheme-program-name "mit-scheme")

I have XUbuntu 12.04, emacs23 and mit-scheme 9.1.1.

¿Any idea about the problem?

Thanks in advance

È stato utile?

Soluzione

But Ctrl + x Ctrl + r open a file in read-only mode. Don't send any buffer to GNU/MIT-scheme interpreter. You need to use M + o instead of. It will send the current buffer to GNU/MIT-scheme interpreter or M + z which send the current expression to evulation.

What I did to have my GNU/MIT-scheme working:

downloaded the xscheme.el file;

copyed this file to emacs_location/emacs/version/lisp directory(note: it must be replace the old file) on my OpenSUSE, the directory is ``/usr/share/emacs/23.3/lisp`.

putted: (load-library "xscheme") into my .emacs file;

Done! it's installed.. visit a new .ss or .scm file, type: M + x and then: run-scheme. If it's installed you can see the new buffer running MIT-scheme interpreter.

Running hello world:

go back to file buffer and write:

(display "Hello,world!")

and then M + o:

You will see something like this(sorry for biggest picture, I can't cut it/resize here):

enter image description here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top