[Emacs-ada-mode] [Ada-mode] ada-xref.el -- command/function 'ada-find-file'

ESCOUFLAIRE Pierre-Louis pierre-louis.escouflaire at eurocontrol.int
Thu Aug 9 02:20:20 PDT 2007


Stephen Leake wrote:
> ESCOUFLAIRE Pierre-Louis <...> writes:
>>While using the ada-find-file function released with emacs-22.1, 
> 
> There is a mailing list for ada-mode
> (http://stephe-leake.org/mailman/listinfo/emacs-ada-mode_stephe-leake.org)
> ; others might be having a similar problem, so it is best to post this
> sort of thing there.
> 

Hello,
I was not aware of it, please accept my apologies.


>>I found the following error:
>>
>>Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>   file-name-as-directory(nil)
>>   ada-find-file-in-dir("filename.adb" (nil "." ...<directories>...))
>>   ada-find-src-file-in-dir("filename.adb")
>>   ada-find-file("filename.adb")
>>   call-interactively(ada-find-file)
>>   execute-extended-command(nil)
>>   call-interactively(execute-extended-command)
>>
>>
>>After few investigation, I found that the function 'ada-find-src-file'
>>does a call to 'ada-xref-get-src-dir-field'.
>>This last function is concatenating strings representing directories
>>into a list. The problem is that the first element of this list, which
>>is nil, is given as a parameter to 'filename-as-directory' that raise
>>the previous error.
>>
>>I think that a simple workaround to this is to change the function
>>'ada-xref-get-src-dir-field' to not concatenate 'nil' strings to the
>>list by simply adding a test case like shows the following elisp
>>code:
> 
> 
> That's a band-aid. The real problem is that there should not be a
> `nil' in the list of directories in the first place.
> 
> Are you using Emacs ada-mode project files? With or without GNAT
> project files?
> 
> How are you setting up your list of Ada directories? 

There is no project files (no .adp, no .gpr) and the list of Ada 
directories is set up through ADA_INCLUDE_PATH and ADA_OBJECTS_PATH 
environment variables.

As far as I can see, the call to 'ada-xref-get-project-field' function 
retrieves the variable 'src_dir' value which is 'nil' according to the 
algorithm.


Regards,
Pierre-Louis ESCOUFLAIRE

____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.




More information about the Emacs-ada-mode mailing list