Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Emacs install clojure development environment     - Upgrading from Fedora 20 to 21 (Linux)

- QEMU code analysis: BIOS loading process (Linux)

- To install the latest version of the EPEL on CentOS 5.x or 6.x (Linux)

- Bash Automated Customization Linux belongs to its own CentOS system (Linux)

- To configure and use multiple Tomcat under Linux environment (Server)

- Linux operating system security settings initial understanding (Linux)

- Ubuntu 14.04 / 14.10 how to install Mate 1.10.0 (Linux)

- Integrated security administrator Linux accident management (Linux)

- CentOS 6.6 installation certification system based on the ftp service (Server)

- CentOS 7 RHEL 7 to reset the root password (Linux)

- iTerm - let your command line can also be colorful (Linux)

- Struts2 configure a static resource files without Struts processing (regular match) (Programming)

- Linux kernel boot to retain large memory method summary (Linux)

- Configuring s3c-linux-2.6.28.6-Real6410 appears Unable to find the QT3 installation (Linux)

- imp / exp Oracle Database import and export commands (Database)

- Implement firewall function on a closed Linux machine (Linux)

- Oracle database on the hit rate of query summary (Database)

- Linux platform host to prevent hacking skills (Linux)

- How to fix Ubuntu / Mint can not add PPA source of error (Linux)

- The strings in Python reside (Programming)

 
         
  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)
project1.core>

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!
nil
0
nil
project1.core> (-main "a")
Hello, World!
(A)
1
nil
project1.core>

Compiler

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!
nil

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
     
         
         
         
  More:      
 
- Vmstat command Linux Performance Monitoring (Linux)
- Standardized UNIX command-line tool (Linux)
- Install Java, Maven, Tomcat under Linux (Linux)
- AngularJS application unit testing started (Programming)
- How to add a new hard disk without restarting the CentOS 7 / RHEL 7 virtual machine (Linux)
- The difference Docker save and export commands (Linux)
- To install Docker under Ubuntu 15.04 (Linux)
- Getting Started with Linux system to learn: how to check memory usage of Linux (Linux)
- The development environment to build Nodejs under Ubuntu 14.04 (Linux)
- C language header file defines a global variable (Programming)
- Security experience: to see how the experts deal with DDoS attacks (Linux)
- How to upgrade to Ubuntu 14.04 Linux Kernel 4.4.1 LTS (Linux)
- Using the Android interface in Parcelable (Programming)
- Explore Android SQLite3 multithreading (Programming)
- Cobbler batch install Ubuntu / CentOS system (Linux)
- Use HttpClient remote interface testing (Programming)
- C ++ based foundation: the difference between C and C ++ (Programming)
- Ordinary users how to use the firewall software (Linux)
- File compression and packaging commands under Linux (Linux)
- 20+ Best Practices article MySQL Performance Optimization (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.