If the projects don't show up in the project tree, then they were not
created. There is probably some bug looking up the list of files in the
loop.
Use edebug-defun in the function, and then when you execute it, press
SPC to step through to see what sort of decisions it is trying to make.
Eric
On 08/09/2010 07:03 AM, Nathan Huesken wrote:
> Hey,
>
> Sorry that it took so long until I answered. I put this into my .emacs:
>
> (ede-create-lots-of-projects-under-dir "~/Projects/" "CMakeLists.txt")
>
> Gives me no error, but how do I see if the Project really exists?
> When I do project->Vew Project Tree, the project is not listed ...
>
> Regards,
> Nathan
>
>
> On Fri, 30 Jul 2010 21:33:11 -0400
> "Eric M. Ludlam"<eric@...> wrote:
>
>> On 07/27/2010 12:43 PM, Nathan Huesken wrote:
>>> Hi,
>>>
>>> For my C++ projects, I have entries like this:
>>> ;;cedet projects
>>> (ede-cpp-root-project "project"
>>> :name "project"
>>> :file "~/Projects/project/CMakeLists.txt"
>>> :include-path '("/include" "/build/include")
>>> :spp-table '(("isUnix" . "")
>>> ("BOOST_TEST_DYN_LINK" . "")))
>>>
>>> And they all look very much the same. All my projects are in
>>> ~/Projects
>>>
>>> Now, my elisp is not good enough for this, but I guess it should be
>>> easy. Can I auto-generate this project enries on emacs startup?
>>> It would be:
>>> For every folder named<project> in ~/Projects:
>>>
>>> (ede-cpp-root-project "<project>"
>>> :name "<project>"
>>> :file "~/Projects/<project>/CMakeLists.txt"
>>> :include-path '("/include" "/build/include")
>>> :spp-table '(("isUnix" . "")
>>> ("BOOST_TEST_DYN_LINK" . "")))
>>
>> Your code could look like this:
>>
>> (defun ede-create-lots-of-projects-under-dir (dir projfile&rest
>> attributes) "Create a bunch of projects under directory DIR.
>> PROJFILE is a file name sans directory that indicates a subdirectory
>> is a project directory.
>> Generic ATTRIBUTES, such as :include-path can be added."
>> (let ((files (directory-files dir t)))
>> (dolist (F files)
>> (if (file-exists-p (expand-file-name projfile F))
>> `(ede-cpp-root-project (file-name-nondirectory F)
>> :name (file-name-nondirectory F)
>> :file (expand-file-name projfile F)
>> attributes)))))
>>
>> I just hacked this up but didn't have a spot to test it. If it works
>> let me know and I can add it to ede-cpp-root.el
>>
>> Eric
>>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> cedet-semantic mailing list
> cedet-semantic@...
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>
|