<commit_before>= Emacs and Inferior Clojure Interaction Mode
<NAME>
2016-08-02
:type: tools
:toc: macro
:icons: font

The following instructions are for ClojureScript >= 0.0-3165.

Assuming you already have `clojure-mode`, run `M-x package-list-packages` and install `inf-clojure`. If you are using Emacs on OS X be sure to install `exec-path-from-shell` so that the Node.js REPL will work correctly. If you need `exec-path-from-shell` make sure to follow the https://github.com/purcell/exec-path-from-shell#usage[Usage] instructions.

Create a REPL file that starts whatever REPL you like (refer to the <<xref/../../../guides/quick-start#,Quick Start>>) and put it in your current directory. For example a `repl.clj` file for the Node.js REPL would look like the following:

[source,clojure]
----
(require 'cljs.repl)
(require 'cljs.repl.node)
(cljs.repl/repl (cljs.repl.node/repl-env))
----

Edit your `.emacs` or `init.el` and add a function like the following if you are using the JAR in your current directory:

[source,clojure]
----
(defun cljs-node-repl ()
  (interactive)
  (run-clojure "java -cp cljs.jar clojure.main repl.clj"))
----

If you are using Leiningen:

[source,clojure]
----
(defun cljs-node-repl ()
  (interactive)
  (run-clojure "lein trampoline run -m clojure.main repl.clj"))
----

Open your ClojureScript file and run `M-x cljs-node-repl`. You'll get a new buffer with the REPL. Switch back to your file and run `M-x inf-clojure-minor-mode`. `C-c C-l` will load the file. `C-c Meta-n` will switch your namespace. If you place your cursor at the end of a s-expression, `C-x C-e` will evaluate that expression. `C-c C-v` will show the docs. `C-c C-s` will show the source. `C-c <return>` will macroexpand. Refer to https://github.com/clojure-emacs/inf-clojure[inf-clojure] for more documentation.
<commit_msg>Change run-clojure to inf-clojure. <commit_after>= Emacs and Inferior Clojure Interaction Mode
<NAME>
2016-08-02
:type: tools
:toc: macro
:icons: font

The following instructions are for ClojureScript >= 0.0-3165.

Assuming you already have `clojure-mode`, run `M-x package-list-packages` and install `inf-clojure`. If you are using Emacs on OS X be sure to install `exec-path-from-shell` so that the Node.js REPL will work correctly. If you need `exec-path-from-shell` make sure to follow the https://github.com/purcell/exec-path-from-shell#usage[Usage] instructions.

Create a REPL file that starts whatever REPL you like (refer to the <<xref/../../../guides/quick-start#,Quick Start>>) and put it in your current directory. For example a `repl.clj` file for the Node.js REPL would look like the following:

[source,clojure]
----
(require 'cljs.repl)
(require 'cljs.repl.node)
(cljs.repl/repl (cljs.repl.node/repl-env))
----

Edit your `.emacs` or `init.el` and add a function like the following if you are using the JAR in your current directory:

[source,clojure]
----
(defun cljs-node-repl ()
  (interactive)
  (inf-clojure "java -cp cljs.jar clojure.main repl.clj"))
----

If you are using Leiningen:

[source,clojure]
----
(defun cljs-node-repl ()
  (interactive)
  (inf-clojure "lein trampoline run -m clojure.main repl.clj"))
----

Open your ClojureScript file and run `M-x cljs-node-repl`. You'll get a new buffer with the REPL. Switch back to your file and run `M-x inf-clojure-minor-mode`. `C-c C-l` will load the file. `C-c Meta-n` will switch your namespace. If you place your cursor at the end of a s-expression, `C-x C-e` will evaluate that expression. `C-c C-v` will show the docs. `C-c C-s` will show the source. `C-c <return>` will macroexpand. Refer to https://github.com/clojure-emacs/inf-clojure[inf-clojure] for more documentation.

{'fraction_non_alphanumeric': 0.12879609544468545, 'fraction_numerical': 0.007592190889370932, 'mean_word_length': 3.7294871794871796, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4910693', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1276, 'n_words': 468}