I installed sbcl
sudo apt-get install sbcl
then loaded quicklisp
sbcl --load ~/Downloads/quicklisp.lisp
then ran the installation command for installing quicklisp
(quicklisp-quickstart:install)
added quicklisp to my init file
(ql:add-to-init-file)
and then installed slime
(ql:quickload "quicklisp-slime-helper")
which then printed out:
(load (expand-file-name "~/quicklisp/slime-helper.el"))
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl")
Which I dutifully copied to my Emacs initialization file.
Upon running M-xslime I got the following error:
Searching for program: No such file or directory, sbcl
so I changed inferior-lisp-program to "/usr/bin/sbcl" as such:
(setq inferior-lisp-program "/usr/bin/sbcl")
Now, when I run M-xslime I get:
Process inferior-lisp not running
and in ielm when I enter inferior-lisp-program I get
ELISP> inferior-lisp-program
"/usr/bin/sbcl"
So I am all out of ideas of what I might have gone wrong. This is a new install by me, and I have used Common Lisp and SBCL in the past with no hiccups. What did I screw up?
edit:
It turns out I was getting this information in the **Inferior Lisp** buffer:
emacs: /usr/bin/sbcl: No such file or directory
Process inferior-lisp exited abnormally with code 127
Turns out it is because I installed Emacs via Flatpak. Emacs installed via Ubuntu's default repository is able to use SBCL and other binaries.
Related
Fresh install of Ubuntu 20.04
Added openjdk-11 and lein 2.9.3
$ sudo apt-add-repository ppa:kelleyk/emacs
Installed
GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14)
of 2020-03-26, modified by Debian
Tried the instructions on the cider Getting Started page
M-x package-refresh-contents
M-x package install <RET>
cider <RET>
The cider package isn't found. Tried to package-list-packages - list doesn't contain cider.
What am I missing?
Finally did the steps from the following link to get it to work
Brave Clojure book companion repo
Not sure why the cider instructions don't mention this.
You need to create a ~/.emacs.d/init.el file with the following contents
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
Save and restart emacs.
M-x package-list-packages check the archive column shows packages from gnu as well as melpa archives.
Sometimes you would see an error Failed to download ‘gnu’ archive. - this one is a flaky one. A restart and/or M-x package-refresh-contents fixed it for me.
Now we have the sources configured correctly.
Install:
M-x package-install <RET> cider <RET>
M-x package-list-packages - Move to the end of the listing to see Status=installed packages.
Test: M-x cider-jack-in. Answer no to the prompt indicating you are not in a clojure project. Soon you should be dropped to a user> prompt - ready to REPL and roll.
You may also consider trying out popular existing "bundle setups' like Spacemacs and Prelude Both of which have all the tooling necessary for Clojure development built-in.
Instead of modifying .emacs or init file manually, you can just change the package-archives variable by typing the following:
M-x customize-variable package-archives
By default, you should only have a GNU source set. Go ahead and add Melpa's name and URL (https://melpa.org/packages/) too by clicking INS. Then apply the changes. Next, type the following commands into the terminal:
M-x package-refresh-contents [RET]
M-x package-install [RET] cider [RET]
You should be all set.
CIDER is available on the two major package.el community maintained repos - MELPA Stable and MELPA.
After adding the following in my ./emacs, i could install CIDER.
(setq package-archives
'(("Elpa" . "https://elpa.gnu.org/packages/")
("Melpa Stable" . "https://stable.melpa.org/packages/")
("Melpa" . "https://melpa.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/"))
package-archive-priorities
'(("MELPA Stable" . 10)
("GNU ELPA" . 5)
("MELPA" . 0)))
I am new to emacs and I was trying to install the Matlab mode for emacs following the instruction on this page:
matlab script editing
Everything compiled fine, but I ran into this error:
Symbol's value as variable is void: letion
When I did "emacs --init-debug" it gave me the following:
Debugger entered--Lisp error: (void-variable letion)
eval-buffer(#<buffer *load*> nil "/home/wjlee/.emacs" nil t) ; Reading at buffer position 404
load-with-code-conversion("/home/wjlee/.emacs" "/home/wjlee/.emacs" t t)
load("~/.emacs" t t)
#[0 "\205\262
I googled around a bit and some people said it's related to using older versions of emacs (emacs23 or older), however, I have emacs24.3.1, so I am not sure why this is still the case. Does anyone know how to fix this, please?
I decided to go a clean install of emacs24.3.1 again, without recompiling cedet and the matlab-emacs components, and somehow it works now... It seems like (from what I found on the web) although the newest version of CEDET is not bundled with emacs24, those that are already in there is enough for me to do the matlab-emacs integration.
Since I am very new to using all these, I'll just post what I found here:
To do a clean install of emacs24:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get purge emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg
sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg
sudo rm /etc/apt/sources.list.d/cassou-emacs-precise.list
Download matlab.el:
cvs -d:pserver:anonymous#matlab-emacs.cvs.sourceforge.net:/cvsroot/matlab-emacs login
cvs -z3 -d:pserver:anonymous#matlab-emacs.cvs.sourceforge.net:/cvsroot/matlab-emacs co -P matlab-emacs
And modify ~/.emacs:
(add-to-list 'load-path "~/.emacs.d/matlab-emacs")
(load-library "matlab-load")
I also found the following useful:
(custom-set-variables
'(matlab-shell-command-switches '("-nodesktop -nosplash")))
And some short-cuts:
Some useful short cuts to begin with:
C-c C-r : run region in matlab
C-c C-s : save and run the file in matlab
C-c C-c E : insert a matching END statment
M-TAB : symbol/variable completion based on the script
M-s : brings up matlab-shell (in a different buffer if available)
M-p, M-n : in matlab-shell (or any emacs shell) cycle through past commands
trying to install yasnippet for emacs 23 from https://github.com/joaotavora/yasnippet
Firstly I attempted the quick install but the yasnippet-bundle.el for the 'quick' install doesn't seem to be in the repository?
Secondly I attempted the full install.
When trying to do the full install I get the following error:
[yas] Check your `yas/snippet-dirs': ~/.emacs.d/snippets is not a directory
I have downloaded the latest bundle joaotavora-yasnippet-e53c41d/ and unpacked in into .emacs.d/plugins/
the addition to my `.emacs' is:
(add-to-list 'load-path
"~/.emacs.d/plugins/joaotavora-yasnippet-e53c41d")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/joaotavora-yasnippet-e53c41d/snippets")
Basically, the install instructions seem to have become out of sync with the latest src. Does anyone know how to install it?
You need to initialize yas/root-directory. Here is how I setup yasnippet
(require 'yasnippet "~/emacs/addons/yasnippet.el")
(yas/initialize)
(setq yas/root-directory "~/emacs/snippets")
(yas/load-directory yas/root-directory)
How I can use the Emacs Code Browser v2.40 with my fresh installed Emacs 23.2 (Debian distro)
In my init.el I have:
(semantic-mode)
(add-to-list 'load-path
"~/.emacs.d/plugins/ecb-2.40")
(require 'ecb)
When I run Emacs, I get an Error message on statrup:
File error: Cannot open load file, semantic-ctxt
I have read CEDET suite is build in from Emacs 23, so I don't have installed it.
This did the trick for me with 2.40:
(require 'semantic/analyze)
(provide 'semantic-analyze)
(provide 'semantic-ctxt)
(provide 'semanticdb)
(provide 'semanticdb-find)
(provide 'semanticdb-mode)
(provide 'semantic-load)
(add-to-list 'load-path "~/ecb-2.40")
(require 'ecb)
I haven't been using it for long, but the obvious features seem to work.
UPDATE: or you can just use the latest CVS snapshot, it's updated for integrated CEDET.
Many people have complained about problems with the CEDET shipped with Emacs 23.2, so I recommend you to try using the standalone CEDET distribution and see if you have the problem with it as well.
I installed leiningen and ran lein swank,
sudo lein deps
lein swank
Aquamacs has everything about SLIME, so it's OK.
Solution to this problem
David helped me to be out of trouble.
As Aquamacs has built-in SLIME, I didn't need anything complex about the setup. I just needed one line - (slime-setup '(slime-repl)).
I had the same problem if I used (slime-setup '(slime-fancy)). Changing it to (slime-setup '(slime-repl)) fixed it.
I found this the easiest setup for the latest version of everything. Here's a quick summary where I"m assuming you have leiningen installed.
Install the swank-clojure plugin
$ lein plugin install swank-clojure 1.3.2
Create your clojure project
$ lein new test-project
$ cd test-project
$ lein deps
Then open one of the clojure files from your project in emacs and run clojure-jack-in
M-x clojure-jack-in
You are now in a slime buffer with clojure and the dependencies for your project loaded.
I found that I needed this in my .emacs to get it to work:
(eval-after-load "slime"
'(progn
(slime-setup '(slime-fancy slime-asdf))))