Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Emacs install clojure development environment     - To get Java class / jar package path (Programming)

- Linux Tutorial Share: How to sudo command to define the PATH environment variable (Linux)

- Linux rename command usage in learning to modify the file name (Linux)

- Why do you need close contact Rust 1.0 (Programming)

- CentOS 6.5 start ActiveMQ being given to solve (Server)

- LAMP environment to build Apache, MySQL, PHP under Ubuntu (Server)

- Oracle to create an external table (Database)

- How to configure chroot environment in Ubuntu 14.04 (Linux)

- Android custom controls create the simplest skid menu in the history (Programming)

- CentOS yum source configuration (Linux)

- Redis-2.8.17 installation and configuration process some errors (Linux)

- Oracle 12c R2 new feature dbca command to create a standby database (Database)

- Linux network security backdoor technology and advanced skill practice (Linux)

- SUSE Linux firewall configuration notes (Linux)

- Linux Live CD lets your PC is no longer secure (Linux)

- Java MD5 encryption implementation (Programming)

- Analysis of Java in the deep copy and shallow copy (Programming)

- Linux Shell Scripting Interview Question (Linux)

- How to write a new Git protocol (Linux)

- How to install and use the Snort in Ubuntu 15.04 (Linux)

  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 5.7 can not log in problem (Database)
- MariaDB 10.0.X, the dynamic column support JSON format to obtain data (Database)
- Android memory optimization of the memory cache (Linux)
- How to use Git to upload code to GitHub project (Linux)
- WEB-based Android Remote Tools Python implementation (Programming)
- 11G ASM disk group does not automatically handle MOUNT (Database)
- Command line tool Tmux (Linux)
- MySQL time field based partitioning scheme summary (Database)
- LNMP summary of the issues common 502 Bad Gateway (Server)
- On FreeBSD 10.2 Bugzilla how to install and configure Apache SSL (Server)
- xargs Detailed description (Linux)
- MySQL Tutorial: Using tpcc-mysql pressure measurement (Database)
- CentOS7 install JAVA notes (Linux)
- View processes and threads under Linux (Linux)
- RedHat command line and graphical interface switching (Linux)
- How to set up HTTPS policies for older browsers (Server)
- Oracle VirtualBox Problem Solving Case (Linux)
- Exploring the Android Listview display confusion (Programming)
- GitLab Guide installation under Ubuntu 14.04 (Server)
- Zookeeper cluster deployment (Server)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.