Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Emacs install clojure development environment     - Linux file permissions bit forced bits and adventure Comments (Linux)

- RHEL (RedHat) 6.3 using EPEL Yum source (Linux)

- Installation of Gitlab under Ubuntu (Linux)

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

- Linux LVM - File system extension (Linux)

- shell script: MySQL startup script simple (Database)

- Ubuntu Slingscold (Linux)

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

- The multiplexed signal driving IO (Programming)

- Expert advice: Do not use the computer security IE browser (Linux)

- Do not enter password login ssh (Server)

- Linux system versions organize local root password cracking method (Linux)

- Linux compression and decompression command (Linux)

- Linux using DenyHosts prevents ssh cracks (Linux)

- About Samba certification process and permissions (Linux)

- The security administrator network analysis tools SATAN Introduction under Linux (Linux)

- How do you access Dropbox Linux command line (Linux)

- Log in CentOS 6.5 Multi-user setting VNC (Server)

- RAID disk array Description (Linux)

- Linux monitoring tools introduced series --smem (Server)

 
         
  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:      
 
- Install Jetty on CentOS / RHEL 6.X (Server)
- WebLogic 12c Configuration Node Manager Managed Server (Database)
- How to implement large-scale distributed Yahoo depth study on the Hadoop cluster (Server)
- Go powerful development server simple example (Server)
- Lenovo Ultrabooks Ubuntu system can not open the wireless hardware switch solutions (Linux)
- Installation under Linux Mint system guidelines for Gtk (Linux)
- VMware 8 installation configuration Win7, CentOS-7 Wizard (Linux)
- CentOS 7.0 Enable iptables firewall (Linux)
- CentOS Linux build SVN server (Server)
- Understand ASP.NET 5 running the command: DNVM, DNX, and DNU (Server)
- Examples of Exploration Class File (Programming)
- To batch create users under Linux (Linux)
- VirtualBox install Windows 8.1 has encountered an error 0x000000C4 solutions (Linux)
- How to install Laravel PHP framework on CentOS 7 / Ubuntu 15.04 (Server)
- Oracle study notes view (Database)
- C language binary tree (Programming)
- MNIST presentation and database conversion (Database)
- How to install MySQL on Linux Dock (Database)
- How MySQL tracking sql statement (Database)
- Oracle DATABASE LINK (DBLINK) Create (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.