I am currently working through the Land of Lisp examples and have run into a compile exception: package EXT does not exist
from this line I suspect:
(ext:shell (concatenate 'string "dot -Tpng -O" fname))
I am running my repl inside emacs with slime and am unsure as to how to remedy this after some googling of the error.
Any help would be much appreciated.
It was in fact that SBCL was set as the default lisp program in emacs.
By replacing:
(setq inferior-lisp-program "/usr/bin/sbcl")
To:
(setq inferior-lisp-program "/usr/bin/clisp")
in my emacs configuration file fixed the issue. (On a Unix system at least)
Related
I followed the instructions here and wrote the following org-mode file:
#+BEGIN_SRC emacs-lisp
(princ (concat (format "Emacs version:\n%s\n" (emacs-version))
(format "\norg version: %s\n" (org-version))))
#+END_SRC
#+RESULTS:
: Emacs version:
: GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
: of 2016-09-17
:
: org version: 9.0.5
#+BEGIN_SRC clojure :results value
(* 6 7)
#+END_SRC
#+RESULTS:
* COMMENT org babel settings
Local variables:
org-confirm-babel-evaluate: nil
End:
As you can see, the evaluation of the emacs-lisp block works and produces the
expected output. Incidentally, it also reports the versions of things I'm using. However, the clojure source block, when evaluated, leaves
Code block returned no value.
I tried many different Clojure expressions in the code block, such as printlns and more. Nothing shows up in the NREPL window, and the results in org mode are always the same: the message above in the minibuffer.
in the emacs minibuffer. Here are the specific steps I took:
$ lein new clojure-example
$ cd clojure-example
$ emacs clojure.example.org
keyboarded in the file above
run emacs command cider-jack-in
That produces a repl window with the following version info:
;; Connected to nREPL server - nrepl://localhost:52695
;; CIDER 0.15.0snapshot (package: 20170403.402), nREPL 0.2.12
;; Clojure 1.8.0, Java 1.8.0_121
etc.
put emacs cursor inside each block and type C-c C-c, which is bound to
org-babel-execute-src-block
Prior to that, I inserted the following code in my emacs initialization file:
(require 'org)
(require 'ob-clojure)
(org-babel-do-load-languages
'org-babel-load-languages
'( (clojure . t)
(emacs-lisp . t)
))
(setq org-babel-clojure-backend 'cider)
(require 'cider)
According to the cited instructions.
I'd be grateful for any help.
Yes, in the current stable release (9.0.5), the org-mode clojure backend is broken and does not work. I submitted a patch which has been applied and I expect will be in the next release.
See https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output/31169#31169
I installed Geiser from source and following this SO answer set the path to drracket.
Here is my part of my .emacs file. I'm on a GNU/linux distribution.
;;;;;;;;;;;;;;;;
;Geiser
;downloaded geiser from git rep and make install
;;;;;;;;;;;;;;
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/")
(require 'geiser-install)
(setq geiser-racket-binary "/usr/racket/bin/drracket")
In emacs when I M-x run-racket on emacs I get the following error:
drracket: unknown switch: -i
Do you have any solution?
Of course the solution was to use
(setq geiser-racket-binary "/usr/racket/bin/racket")
instead of :
(setq geiser-racket-binary "/usr/racket/bin/drracket")
I've setup Emacs + Ensime for scala.
I'm able to start sbt console inside emacs using C-c C-v s
If i start scala console inside emacs using C-c C-v z, I get the following error
Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_33).
scala>
Failed to initialize compiler: class scala.reflect.BeanInfo not found
What is the fix for this error? How do i get scala console running inside Emacs?
I've ran into a similar error recently, but here's how I worked around it (but I don't know how to fix it, so this is only half the answer). What I did was to customize the ensime-inf-default-cmd-line variable to have the value: '("sbt" "console"). Which will indeed start the interactive Scala environment.
EDIT:
Here's relevant parts from .emacs, but I'm not sure it will matter / will be the same in every install:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
;;
;; more stuff ...
;; I'm not sure this line is correct / makes any difference
'(ensime-inf-cmd-template (quote ("sbt" "console" "-classpath" :classpath)))
;; This variable is used to launch the interpreter
'(ensime-inf-default-cmd-line (quote ("sbt" "console"))))
(require 'scala-mode2)
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-to-list 'load-path "~/.emacs.d/ensime/elisp/")
(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)
I've installed scala-mode2 from MELPA. Installed sbt version 0.12.0 by downloading an RPM from their site. I had previously JRE and JDK installed, the active version is OpenJDK 1.7. Scala installed is 2.9.2. I don't know how to identify Ensime's version :|
I work with Emacs 24.0.92 (9.0) on Mac OS X 10.7.3. I downloaded and installed
EMMS via git clone git://git.sv.gnu.org/emms.git and my ~/.emacs contains...
(add-to-list 'load-path "~/.emacs.d/emms/lisp")
(require 'emms-setup)
(emms-standard)
(emms-default-players)
... as suggested on http://www.gnu.org/software/emms/quickstart.html
If I use M-x emms-play-directory and choose a directory that contains .mp3
files, I obtain:
Don't know how to play track: (*track* (type . file) (name
. "/path/to/music/first song in this directory.mp3") (info-mtime 19612 57269)
(metadata))
I don't have mplayer installed, but VLC is installed and works perfectly
fine. What additional settings do I need in order for this to work?
Note that the player-list contains VLC (and others -- just the default). I also
set it to only VLC, but that gave the same error.
Also note that I found a similar error on
https://superuser.com/questions/179186/emms-emacs-multimedia-system-error-in-emacs-dont-know-how-to-play-track
but the "solution" there does not really explain what the problem is.
try following two steps that works on my Mac OS X 10.7.4
install mplayer on Mac
brew install mplayer
Add /usr/local/bin (where mplayer located) to emacs's exec-path by Adding following line to your ~/.emacs file
(setq exec-path (append exec-path '("/usr/local/bin")))
BTW, Following is all configuration related with emms in my .emacs file:
(setq exec-path (append exec-path '("/usr/local/bin")))
(add-to-list 'load-path "~/.emacs.d/site-lisp/emms/lisp")
(require 'emms-setup)
(require 'emms-player-mplayer)
(emms-standard)
(emms-default-players)
(define-emms-simple-player mplayer '(file url)
(regexp-opt '(".ogg" ".mp3" ".wav" ".mpg" ".mpeg" ".wmv" ".wma"
".mov" ".avi" ".divx" ".ogm" ".asf" ".mkv" "http://" "mms://"
".rm" ".rmvb" ".mp4" ".flac" ".vob" ".m4a" ".flv" ".ogv" ".pls"))
"mplayer" "-slave" "-quiet" "-really-quiet" "-fullscreen")
I have EMMS working fine with VLC on Mac OS X 10.9.1, this is my configuration related with EMMS:
(add-to-list 'load-path "~/.emacs.d/emms/lisp")
(require 'emms-setup)
(require 'emms-player-vlc)
(emms-standard)
(emms-default-players)
(setq emms-player-vlc-command-name
"/Applications/VLC.app/Contents/MacOS/VLC")
I had the same problem with Emacs 23.2 on Debian squeeze.
I managed to resolve it thanks to the links you gave, but I've no idea what was going on…
I added the following :
(setq emms-player-list '(emms-player-mpg321
emms-player-ogg123
emms-player-mplayer))
;debug players
(emms-player-for '(*track* (type . file)
(name . "myfile.pls")))
'eval-current-buffer' was not enough, I had to restart emacs. Then if I remove those lines, emms keeps working…
Emms was so difficult to make work for me. Mpg123 is maybe less featureful, but much easier : http://wikemacs.org/wiki/Media_player#Mpg123
It seems like emms has problems with spaces in the path name. Remove the spaces in the path name and it should work, if you don't have any other problems. Why would you want to run emms in os x anyways?
This fixes it for me:
(setq emms-player-mpg321-parameters '("-o" "alsa"))
I have the following from the slime repl (no clojure.contib functions found):
M-X slime
user=> (:require 'clojure.contrib.string)
nil
user=> (doc clojure.contrib.string/blank?)
java.lang.Exception: Unable to resolve var: clojure.contrib.string/blank? in this context (NO_SOURCE_FILE:10)
And the following when starting clojure from console (but here everything is being found OK):
adr#~/clojure/cloj-1.2$ java -cp /home/adr/clojure/cloj-1.2/clojure.jar:/home/adr/clojure/cloj-1.2/clojure-contrib.jar -server clojure.main
user=> (:require 'clojure.contrib.string)
nil
user=> (doc clojure.contrib.string/blank?)
-------------------------
clojure.contrib.string/blank?
([s])
True if s is nil, empty, or contains only whitespace.
nil
In my .emacs I have the following:
(setq inferior-lisp-program "java -cp /home/adr/clojure/cloj-1.2/clojure.jar:/home/adr/clojure/cloj-1.2/clojure-contrib.jar -server clojure.main")
My clojure jars (1.2) are at '/home/adr/clojure/cloj-1.2'.
I;m a newbie with emacs, been following some tutorials. For some time I've been trying to use the clojure.contrib library from Emacs, but "M-X slime" finds no clojure.contrib. Please, help
Edit: if that would help, now i saw that when using M-X slime there is a message:
(progn (load "/home/adr/.emacs.d/elpa/slime-20100404/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.4493" :coding-system "iso-latin-1-unix"))
Clojure 1.2.0
user=> java.lang.Exception: Unable to resolve symbol: progn in this context (NO_SOURCE_FILE:1)
Edit2: But there is no such error message if I use M-X slime-connect after having started a "lein swank" in a directory (though even starting with "M-X slime-connect" there are no clojure-contrib libraries found in the REPL (though they are downloaded by leiningen as dependency)).
This line:
(progn (load "/home/adr/.emacs.d/elpa/slime-20100404/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.4493" :coding-system "iso-latin-1-unix"))
is Common Lisp, not Clojure, but since you set inferior-lisp-program to Clojure, slime can't start a swank server.
See the following sections in swank-clojure project:
Connecting with SLIME
Embedding
swank-clojure.el
The functionality you want is probably in swank-clojure.el, but it is not recommended anymore.
As you're already using ELPA:
add-to-list 'package-archives
'("technomancy" . "http://repo.technomancy.us/emacs/") t)
M-x package-install ;(slime-repl)
M-x slime-connect
It seems to me that I was using the wrong way to "require" libraries in the REPL (due to my inexperience with clojure); when using a syntax such as:
user=> (require 'clojure.contrib.string)
nil
user=> (clojure.contrib.string/blank? "asd")
false
all the libraries are being found OK (no matter if using "M-X slime" for a non-swank REPL or "M-X slime-connect" for a swank server). So it was entirely my mistake (I have found hints about my mistake at this stackoverflow answer: Why do I get an error when I run (use 'clojure.contrib.repl-utils)?)