0

It seems like Project.ede only accepts predefined project, which are Arduino Sketch, Android, Automake and Make. I pasted ede-cpp-root-project, but upon entering project root that has Project.ede, I encountered this error:

eieio-persistent-read: Corrupt object on disk: Unknown saved object

Here is the ede-cpp-root-project I pasted into:

(ede-cpp-root-project "Coloring"
                      :file "~/workspace/discrete_optimization/hw2/Project.ede"
                      :include-path '("/"
                                 "/include"
                                 "/include2"
                                 "/include3"))

I really want to create a file per project, not in a centralized file.

Amumu
  • 17,924
  • 31
  • 84
  • 131

1 Answers1

1

Use of a Project.ede file is only for a specific project type of Make or Automake. While you could type it in by hand, you should use ede-new for creating them. Also, only use that type of project if you want EDE to create your Makefiles for you. You are getting the the 'corrupt' message because Emacs will refuse to load the file if it finds anything other than one of the two support project types.

If you would like to use ede-cpp-root-project, you can create any old file like "myproject.el" and put your ede-cpp-root-project config in it. Then do

M-x load-file RET /path/to/myproject.el

to load it up when needed.

Eric
  • 3,959
  • 17
  • 15
  • Thanks. But why is it not possible to include the other project types? I think it would be useful if Project.ede allows custom project like `ede-cpp-root-project`. Doing so would make it more convenient because we don't have to manually load the project file, and this is a really simple (which means easy) way to create a project just for navigation/completion. – Amumu Jul 15 '14 at 06:42
  • The problem is that if arbitrary code is run from a key file when you edit a different file, such as your source code, then a cracker could create a project, you would un-tar it, open a source file, and Emacs would then run a chunk of their code without your permission. – Eric Jul 15 '14 at 11:56
  • But then, why doesn't EDE allow other simple project types that are part of EDE, i.e. `ede-cpp-root-project` or other project types as defined [here](https://www.gnu.org/software/emacs/manual/html_node/ede/Simple-projects.html#Simple-projects)? I think it should be perfectly fine for `Project.ede` to accept only Lisp code for defining EDE project types (i.e. `ede-cpp-root-project`...), so we don't have to worry about malicious ELisp code. And then, people can always write harmful shell commands in a handmade Makefile, but yet we still use it. – Amumu Jul 15 '14 at 13:34
  • In the case of ede-cpp-root-project, the goal was to satisfy a set of users that didn't want to pollute their projects with Project.ede like files. Also, no one had asked before. My intention is to replace ede-cpp-root-project with the features in the generic project types. I have some changes that will make the generic projects more stable/useful, thus beginning that change, and those have a project configuration file. – Eric Jul 15 '14 at 21:46