Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Emacs install clojure development environment     - Binding unofficial Google Drive and Ubuntu 14.04 LTS (Linux)

- Linux compiler installation Redis (Database)

- The Gitlab migrated to Docker container (Server)

- The signature can not be verified under Debian (Linux)

- CentOS 6.x systems installation + NIC driver installation (Realtek PCIe GBE Family Controller for Linux) (Linux)

- Monitoring services are running properly and will email alert (Server)

- Construction LVM-based raw device Oracle10g Database on Oracle Linux 5.11 (Database)

- 5 interesting Linux command line tips (Linux)

- Eclipse installs support for Java 8 (Linux)

- Configuring Sublime Text Python runtime environment 2 (Linux)

- SA weak password security system of the security risks posed (Linux)

- C ++ constant definition (Programming)

- Ubuntu 14.04 install AMD graphics driver is fully dual monitor solution (Linux)

- Linux process stack and process function stack frame (Linux)

- Linux yum command Detailed (Linux)

- How to use awk command in Linux (Linux)

- Web server security policy (Linux)

- Ubuntu 14.04 and derivative version of the user on how to install cURL 7.37.1 (Linux)

- JBPM6 Tutorial - Fast Fun JBPM table (Linux)

- grep command Detailed and relevant examples (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:      
 
- How MySQL tracking sql statement (Database)
- Create a DLL using MinGW and Attention (Programming)
- Android custom ViewPager create kaleidoscopic image transition effects (Programming)
- In addition to wget and curl, what better alternatives (Linux)
- The relationship between UNIX and Linux (Linux)
- Analysis of memory mapping process in Linux x86-32 mode (Linux)
- Linux ldconfig command (Linux)
- Ubuntu 14.04 LTS compiler installation R Source Code (Linux)
- Linux source code analysis tool (Linux)
- Ubuntu 14.04 install Sublime Text 3 plug and use SublimeClang (Linux)
- Git version rollback (Linux)
- Sublime Text 3 practical functions and shortcut keys used to collect (Linux)
- Some of the bibliographic management tools to good use on linux (Linux)
- To install Python-Pip and Fabric under CentOS / Ubuntu (Linux)
- Thinking in Java study notes - everything is an object (Programming)
- Understand ASP.NET 5 running the command: DNVM, DNX, and DNU (Server)
- Use mod_wsgi Django application deployment (Server)
- Linux network cut package is not fully defragment (Linux)
- Linux fast set ip bond (Linux)
- Linux Getting Started tutorial: XWindow what (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.