3

I'm going through the Coursera Startup Engineering course offered by Stanford. The assignment is asking me to open a node REPL within emacs by using the command C-c!. I don't seem to be able to use the '!' that it requires.

The instructor first has me using C-x 3 to split the buffer into two pieces. Then we are to use C-c! but I can't get it to work.

I have tried Ctrl-C -> Shift-! and I get the error message: C-c ! is undefined

I have tried enter the '!' while still holding C-c and also to use the meta key with no luck.

Anyone know what I'm doing wrong here? Could it be a problem with my keybindings?

Link to the tutorial video: https://class.coursera.org/startup-001/lecture/173

  • Emacs doesn't have a REPL for NodeJS out of the box. Are you using [`nodejs-repl`](https://github.com/abicky/nodejs-repl.el)? Something else? – ChrisGPT was on strike Sep 15 '14 at 17:19
  • 1
    I don't think Emacs supports this out of the box. Your instructor is probably using an add-on package, and should be giving you instructions on how to do the same. Alternatively, perhaps they are using an Emacs distribution that comes with such a package bundled. – Tyler Sep 15 '14 at 17:19

2 Answers2

2
  1. Check whether .emacs is present using the command " ls -la .emacs "
  2. If it is present use "mv .emacs old.emacs"

This should solve your problem, for some more solutions regarding the same problem, check the thread

https://class.coursera.org/startup-001/forum/thread?thread_id=3013

ayniam
  • 573
  • 2
  • 8
  • 27
1

The C-c keymap is generally mode-specific, so the missing step is that you're probably not in the right mode. The footnote he has mentions the "comint-mode" feature. when we loads fibonocci.js, he's just in Javascript mode, does the C-x 3, and then uses a keybinding that isn't present by default.

There's some info at how to run node.js interactively in Emacs on Windows. You probably don't have to use that however.

Your instructor has some code in his ~/.emacs - pulled in from a class Github repo - that should be shared with students. It's probably a good idea to review his lecture segment "Emacs: Installation" in 4b.

git clone https://github.com/startup-class/setup.git (the script in there calls "git clone https://github.com/startup-class/dotfiles.git" too)

It looks like he has a fondness for putting ".sh" on the end of shell scripts. Be warned that this is incorrect for shell scripts used as commands, since it unnecessarily exposes an implementation detail, breaking a sort of encapsulation.

Community
  • 1
  • 1
Alex North-Keys
  • 4,200
  • 1
  • 20
  • 22