Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Emacs install clojure development environment     - Linux disk partition batch format mount script (Linux)

- To create a problem by the statement date comparison of the difference between MySQL and Oracle (Database)

- Oracle PLS-00231 error analysis (Database)

- Php and MySQL command add to the environment variable method in Linux system (Linux)

- The text formatting tools awk Linux system (Linux)

- Use netcat [nc] command on Linux and Unix port scan (Server)

- C ++ Supplements - locates the new expression (Programming)

- Oracle table compression Technology Introduction (Database)

- Java by Spy Memcached to cache data (Programming)

- Iptables in Ubuntu (Linux)

- PostgreSQL-- run Supervisord on Docker in Ubuntu (Database)

- PLSQL often lose resolution process automatically disconnect the connection (Database)

- Ubuntu 14.04 configure JDK1.8.0_25, switchable version (Linux)

- Ubuntu Tutorial: E: Failed to get lock / var / lib / apt / lists / lock - open (Linux)

- How to monitor Nginx (Database)

- Linux System Getting Started Learning: Using yum to download the RPM package without installing (Linux)

- shell script: the number of characters in the text to print no more than 6 words (Programming)

- Linux common commands MEMO (Linux)

- Let 32 Linux / CentOS system to support more than 4G memory (Linux)

- Linux system security configuration (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:      
 
- Security implementation of disk data protection under Linux (Linux)
- Linux user login and IP restrictions (Linux)
- Write perfect printf (Programming)
- Java objects are taking up much space (Programming)
- Performance Optimization: Using Ramlog transfer log files to memory (Linux)
- Logging information through the web GUI (LogAnalyzer) (Server)
- How to download apk file from the Google Play store on Linux (Linux)
- RabbitMQ installation, configuration, monitoring (Linux)
- Linux Quick Install MongoDB (Database)
- 10 Codes of good practice PHP (Programming)
- Source install Python3.4 on CentOS (Linux)
- GAMIT baseline solution using batch were counted (Linux)
- Python decorators to learn and practice the actual usage scenarios (Programming)
- Linux installation skynet issue summary (Linux)
- Fedora 22 how to play rmvb mp4 mkv video files (Linux)
- Three strategies to teach you to release the device memory (Linux)
- Win8 mount disk partitions under Ubuntu (Linux)
- About Leetcode on Binary Tree Algorithm summary (Programming)
- Java Builder mode (Programming)
- Six Ways to view slides can be implemented Android (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.