Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Emacs install clojure development environment     - Ubuntu program using the Sound Recorder (Linux)

- shell script: a key to install LAMP, LNMP script (Server)

- Use source packages compiled and installed GCC5.1 in Mac OS X 10.10.3 (Linux)

- MySQL 5.6 Open full query log (Database)

- Linux Proc File System Experiment (Linux)

- Ubuntu 14.04 users how to install VLC 2.2.0 (Linux)

- How to implement large-scale distributed Yahoo depth study on the Hadoop cluster (Server)

- Ubuntu15 core CLR (Server)

- Database Blob data type conversion String (Programming)

- To batch create users under Linux (Linux)

- TCP protocol flaw incomplete records (Linux)

- Install Rubinius testing Ubuntu 14.04 native threads (Linux)

- PL / SQL how to make the program every few seconds to insert a data (Database)

- 22 Port weak passwords and SSH connection program of the Linux server (Linux)

- 10 really interesting Linux command (Linux)

- Java coding conventions (Programming)

- Exploring the Android Listview display confusion (Programming)

- Linux command execution judge sentences -;, &&, || (Linux)

- Grading defense against Linux server attacks (Linux)

- CentOS achieve trash mechanism (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)
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:      
 
- CentOS 6.5 install Firefox (Linux)
- Gentoo: startx problem appears Failed to load module (Linux)
- Linux file compression and archiving (Linux)
- Copy U disk files to the Linux system on a virtual machine (Linux)
- Linux installation is larger than 2TB (UEFI interface) hard disk solution (Linux)
- Valgrind * not * leak check tool (Linux)
- iOS Sensor Development - add to APP phone password, fingerprint security authentication (Programming)
- Linux PXE unattended installation PXE-E32: TFTP OPen timeout the solution (Linux)
- CentOS7 Minimal minimize installation and then install the GNOME graphical interface (Linux)
- MySQL root password reset under CentOS (Database)
- Use SecureCRT to transfer files between local and remote hosts (Linux)
- To create a Linux server network security (Linux)
- 64-bit Ubuntu 15.10 How to compile the latest version of the 32 Wine 1.7.53 (Linux)
- CMake Quick Start Tutorial (Linux)
- Percona MySQL 5.6 semi-synchronous replication (Database)
- Samhain: Powerful intrusion detection system under Linux (Linux)
- Spring3 + SpringMVC + Hibernate4 full annotation environment configuration (Server)
- Eclipse distributed management using GitHub project development (Linux)
- How to install the Linux text editor Atom 0.124.0 (Linux)
- Simple RPM package production (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.