Lisp error while using ede-cpp-root-project - emacs

I've been trying to get the CEDET working with a simple project for the last little while. I have the following project file:
(ede-cpp-root-project "aesalon-project"
:name "aesalon-name"
:file "~/projects/aesalon/SConstruct"
:include-path '("/"
"/include/"))
I've been loading the above into a buffer and executing the buffer contents. The problem is not with the project not loading correctly -- it seems to bet set up properly; I can change the settings etc. using the menubar. When I try to rescan the project's files, however, I get the following error:
Debugger entered--Lisp error: (wrong-type-argument class-p ede-cpp-root)
signal(wrong-type-argument (class-p ede-cpp-root))
child-of-class-p(ede-cpp-root-project ede-cpp-root)
object-of-class-p([object ede-cpp-root-project "aesalon-project" nil "aesalon-name" "1.0" "/home/ethereal/projects/aesalon/" 3546321 "/home/ethereal/projects/aesalon/SConstruct" nil nil nil unbound unbound "" "" "" "" "" "" ("debug" "release") "debug" nil ("/" "/include/") nil nil nil "\\.\\(h\\(h\\|xx\\|pp\\|\\+\\+\\)?\\|H\\)$\\|\\<\\w+$" nil] ede-cpp-root)
ede-toplevel-project("~/projects/aesalon/")
ede-rescan-toplevel()
call-interactively(ede-rescan-toplevel nil nil)
I find this somewhat odd, as when I look at the documentation for ede-cpp-root-project I see that it has ede-project as its parent, not ede-cpp-root? Or am I misunderstanding the trace? I'm not very familiar with Emacs Lisp.
Here's my output from cedet-version:
CEDET Version: 1.0
Requested File Loaded
Package Version Version Version
----------------------------------------------------------
cedet: 1.0 ok ok
eieio: 1.3 ok ok
semantic: 2.0 ok ok
srecode: 1.0 ok ok
ede: 1.0 ok ok
speedbar: 1.0.3 ok ok
cogre: 1.0 ok Not Loaded
cedet-contrib: 1.0 ok Not Loaded
C-h f cedet-version RET
for details on output format.
And my emacs version: (latest from Arch Linux repositories)
GNU Emacs 23.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.9) of 2012-02-01 on shirley.hoetzel.info
Does anyone have any suggestions on how I could go about fixing this issue? Is it a problem with my project? My CEDET environment? Version of emacs?

Apparently the problem is inconsistencies in EDE and CEDET. As best I can tell, the version of the CEDET that I was using was relying on an old architecture of EDE that has since been changed.
Compiling the CEDET from the latest source tree instead of the (older) snapshot I was using fixed the problem.

Related

Ensime not typechecking correctly, nor is its autocomplete working

I wanted to try and see how good Ensime's type checking capabilities were, and while they seemed to work fine at first, it appears it keeps referencing bits of code that no longer exist: (larger version here)
It says it couldn't find the value asdfadsfasdf which was correct, back when I wrote it as random garbage to test the type checker; however it's not there anymore and Ensime keeps complaining about it, rather than spotting the missing : and wrong type name in the when function.
Add to that the fact that despite it having access to the Ensime server, it still won't run autocomplete..
Specs:
Emacs version: 24.3.1
Sbt version: 0.13.5
System: Mac OS X version 10.9.5 "Mavericks"
Excerpt from .emacs that relates to Ensime and Scala:
(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)
What do I do to get it working correctly?

error on invalid function: abbrev

I used to use Emacs in windows, recently I want to try Ubuntu 14.04. I used the same settings, same init.el, same packages. but I got an error when start Emacs under Ubuntu.
I am not an elisp programmer, and I hope I can get some help here. I am using Prelude for Emacs 24, but even I run emacs with -Q, the same error is still there....
The errors are as follows:
Debugger entered--Lisp error: (invalid-function "abbrev")
"abbrev"("convenience" "matching")
byte-code("\300\301\302\303\304\305\306\307\310\311\312\"&\207" [define-package "company" "20140731.944" "Modular text completion framework" ((emacs "24.1") (cl-lib "0.5")) :url "http://company-mode.github.io/" :keywords "abbrev" "convenience" "matching"] 11)
load("/home/zhijia/.emacs.d/elpa/company-20140731.944/company-pkg" nil t)
package-load-descriptor("/home/zhijia/.emacs.d/elpa" "company-20140731.944")
package-maybe-load-descriptor("company" "20140731.944" "/home/zhijia/.emacs.d/elpa")
package-load-all-descriptors()
package-initialize()
byte-code("\302\303!\210\302\304!\210\305\306\307\310#\210\311\312\"\313 \207" [prelude-dir package-user-dir require cl package add-to-list package-archives ("melpa" . "http://melpa.milkbox.net/packages/") t expand-file-name "elpa" package-initialize] 4)
require(prelude-packages)
eval-buffer(#<buffer *load*> nil "/home/zhijia/.emacs.d/init.el" nil t) ; Reading at buffer position 4156
load-with-code-conversion("/home/zhijia/.emacs.d/init.el" "/home/zhijia/.emacs.d/init.el" nil nil)
load("/home/zhijia/.emacs.d/init.el" nil nil t)
load-file("~/.emacs.d/init.el")
call-interactively(load-file record nil)
command-execute(load-file record)
execute-extended-command(nil "load-file")
call-interactively(execute-extended-command nil nil)
Delete ~/.emacs.d/elpa, restart Emacs, and let Prelude install all packages again.
It looks like you've stumbled across incompatibilities between package.el in different Emacs versions. I'm not sure why, though. Normally errors like this only occur when upgrading from Emacs 23 to 24, or when upgrading from Emacs 24.3 to the (not yet released) Emacs 24.4. Neither of these seem to be the case here, though.
You are getting this error with emacs -Q as well, because emacs -Q still loads all user-installed packages from ~/.emacs.d/elpa.
It seems you need to remove the ~/emacs.d/elpa/company-XXX and re-install it.
Even if you call it with -Q, it still has a startup file that checks the ~/.emacs.d/ directory.
Try first to remove the .elc files before to remove everything.

error for semantic in emacs 23.3 with integrated cedet

Here is the version of cedet I am using
CEDET Version: 1.0
Requested File Loaded
Package Version Version Version
----------------------------------------------------------
cedet: 1.0 nil ok
eieio: 1.3 nil ok
semantic: 2.0 nil ok
srecode: 1.0 nil Not Loaded
ede: 1.0 nil ok
speedbar: 1.0 nil ok
emacs version 23.3.1
When I run "M-x semantic-ia-fast-jump", I got the error:
Wrong type argument: stringp, (((0) "ptrdiff_t"))
Anybody knows why? It's definitely not because the data type of the variable is "ptrdiff_t".
for version 23.x it still better to use version from BZR as it incorporates more fixes for C++, plus many other improvements... Details on installation & customization you can find in this article.

I can't initialize neither swank nor clojure-jack-in

I've a problem. I've installed clojure, slime, slime-repl and elein using marmalade. Now I open my project and call elein-swank. I get this:
Starting swank..
error in process filter: slime-presentation-init-keymaps: Symbol's function definition is void: slime-define-both-key-bindings
error in process filter: Symbol's function definition is void: slime-define-both-key-bindings
and If I try clojure-jack-in I get
Debugger entered--Lisp error: (error "Could not start swank server: That's not a task. Use \"lein help\" to list all tasks.
signal(error ("Could not start swank server: That's not a task. Use \"lein help\" to list all tasks.\n"))
error("Could not start swank server: %s" "That's not a task. Use \"lein help\" to list all tasks.\n")
clojure-jack-in-sentinel(#<process swank> "exited abnormally with code 1\n")
What can I do?
I'm not sure what elein is, but I think for clojure-jack-in you need to install the swank-clojure plugin:
lein plugin install swank-clojure 1.3.3
update: as of 2013, M-x nrepl-jack-in is preferred
The jack-in method is the preferred one, but you may also try the old favorite: run
$ lein swank
from the project's main dir, and then:
M-X slime-connect
from emacs. You still need swank-clojure:
$ lein plugin install swank-clojure 1.3.3
this happened to me when i cloned someone else's clojure project from an older version. their project.clj had:
:dev-dependencies [[lein-clojars "0.5.0"]
[swank-clojure "1.2.1"]]
which is incorrect, i think, if you're using M-x clojure-jack-in. removing these lines, running lein deps and jacking in worked for me.
If you're using lein 2, then try adding {:user {:plugins [[lein-swank "1.4.4"]] } } to ~/.lein/profiles.clj. see the Plugins section of https://github.com/technomancy/leiningen/wiki/Upgrading and https://github.com/technomancy/swank-clojure

How to compile CEDET 1.0pre7 compilation for Emacs 23.1.50 on Windows?

I'm trying to compile CEDET from CVS for Emacs 23.1.50 on Windows and I've got error on "Step 6: Turning on EDE...": "defvar: Symbol's value as variable is void: cedet-menu-map". Compilation of CEDET 1.0pre6 raises the same error.
CEDET has been integrated into Emacs after 23 was released. As such, you don't need to compile CEDET for your Emacs, you just need to turn it on. In such a version of Emacs, the only difference from the install instructions from CEDET is that you don't need to load cedet.el, and you do need to turn on (semantic-mode 1) to do what cedet.el used to do.