[Emacs-ada-mode] Finding spec/body in same directory
Simon Wright
simon at pushface.org
Thu Jun 19 12:29:19 PDT 2008
On 18 Jun 2008, at 21:27, Manuel Gomez wrote:
> I have noticed that in previous versions of ada-mode when using
> ff-find-other-file (C-c o) the other file is found in the same
> directory. With the current version, the file is searched in all the
> directories in the project.
>
> In my project, all the specifications and their corresponding bodies
> are
> stored in the same directories. On the other hand, the list of
> directories is very long and the access to files is slow.
>
> Is there a way to return to the old behaviour in the new version?
The important thing is to find the file where the compiler will find it!
GCC, I think, uses the first occurrence of a file on its search path.
gnatmake, however, insists on there being only one file on the search
path for the project (unless you are extending another project).
It would be quite normal for us to have:
spec in directory X
body (with body stubs) in directory X
proper bodies and some handwritten source in directory Y
and then replacement ('patch') proper bodies in directory Z.
So it's not that simple .. but with about 500 directories and 19_000
source files, it typically takes less than a second on a 3 GHz Windows
box to get to the right place (that's using AdaCore's GLIDE; but the
general mechanism is the same, I feel their convert_prj utility is
quite fast compared to gnatpath but no timings to hand),
More information about the Emacs-ada-mode
mailing list