Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Emacs install clojure development environment     - Deep understanding of C # generics (Programming)

- Linux Monitoring Command (Linux)

- How to use the TF / SD card making Exynos 4412 u-boot boot disk in Ubuntu (Linux)

- Ubuntu 12.04 LTS installation configuration JDK1.6.0_45 (Linux)

- Solaris 11 forget the root password (Linux)

- Oracle RAC upgrade to problems encountered (Database)

- ElasticSearch - Basic Concepts (Server)

- Linux rpm command Detailed (Linux)

- PHP Performance Analysis and Experiment: Performance Micro Analysis (Programming)

- 10046 trace only open for a particular SQL statement (Database)

- shell script: MySQL monitoring service is normal (Database)

- CentOS7 install MySQL 5.5 (Database)

- Introduction to Linux Shell (Programming)

- 6 common PHP security attacks (Linux)

- MySQL use benchmarking tool sysbench (Database)

- Dialogue UNIX:! $ # @ *% (Linux)

- MySQL multi-master-slave synchronization (Database)

- Ubuntu Backup and Recovery (Linux)

- TNS-03505 name could not be resolved (Database)

- Oracle 11g Export guide problem not an empty table (Database)

  Emacs install clojure development environment
  Add Date : 2018-11-21      
  CIDER module installation

It is quite simple, is to use the list-packages to find, find CIDER after installation.

Direct mounting command fails with official documents, or use the above method.

The use of middleware version mismatch

project.clj project file to add the penultimate row

(Defproject project1 "0.1.0-SNAPSHOT"
  : Description "FIXME: write description"
  : Url "http://example.com/FIXME"
  : License {: name "Eclipse Public License"
            : Url "http://www.eclipse.org/legal/epl-v10.html"}
  : Dependencies [[org.clojure / clojure "1.7.0"]
                [Clj-http "2.0.0"]]
  : Plugins [[cider / cider-nrepl "0.10.0-SNAPSHOT"]]
  : Main project1.core)

Starting and connecting REPL

Open the project source code files core.clj

Then the M-x emacs to run commands cider-jack-in, will start cider-nrepl connection repl process. There are two buffer, the above source code, the following are repl

When you see the following passage like. cider-nrepl do match the version of the work.

; CIDER 0.10.0snapshot (package: 20151013.1548) (Java 1.7.0_79, Clojure 1.7.0, nREPL 0.2.10)

Type a line of code in the source code buffer, move the cursor to the end of the line, press the C-x C-e, and the result will be displayed in the repl buffer.

Run the program

REPL we can run a program, you can enter (-main) running main function

; CIDER 0.10.0snapshot (package: 20151013.1548) (Java 1.7.0_79, Clojure 1.7.0, nREPL 0.2.10)
project1.core> (-main)
Hello, World!
project1.core> (-main "a")
Hello, World!


Core.clj can continue to edit the file, add new functions, then C-c C-k compile the file, then run the program.

For example, a function add the following, and then compile, run:

(Defn train
  (Println "Choo choo!"))

The result:

project1.core> (train)
Choo choo!

Smart Tips

mini buffer which will warn you of possible options, such as input (-main time, mini buffer will show the remaining parameters

Init.el add this in, you can use company-mode automatic completion

(Add-hook 'cider-repl-mode-hook #' company-mode)
(Add-hook 'cider-mode-hook #' company-mode)

Other shortcuts

1. C-↵ will add a right parenthesis, and expression evaluation (evaluate)

Get error message

You can use the command (take) command with the q key to exit stacktrace buffer

Later you can enter * cider-error * buffer error message View History
- MySQL Tutorial: Some optimized for I / O memory areas (Database)
- To install and deploy Java applications under CentOS 6.5 (Linux)
- How do I upgrade from Ubuntu 15.04 to Ubuntu 15.10 (Linux)
- CentOS installed JDK8 (Linux)
- GitLab Installation Guide -Ubuntu 14.04 LTS (Server)
- The principle Httpclient4.4 (HttpClient Interface) (Programming)
- Java rewrite the hashcode method (Programming)
- Oracle how to assess the true concurrent session (Database)
- LAMP environment to build Apache, MySQL, PHP under Ubuntu (Server)
- Oracle 10046 Event (Database)
- CentOS7 yum install third-party source EPEL (Linux)
- Python 2.7.9 Installation on Linux CentOS 6.6 (Linux)
- Using monitoring tool dsniff (Linux)
- To build a private Docker registry (Server)
- Bash job control (Linux)
- A drop datafile Oracle bug (Database)
- Ubuntu install OpenMPI (Linux)
- Infinispan 8 new Redis cache storage implementation (Linux)
- Ubuntu 10.10 install Oracle 10g Installation Guide (Database)
- Convert MySQL date string to a NULL value exception handling (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.