ada-mode-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

3.2 Selecting projects -- So, how do I select projects?


From: Left Right
Subject: 3.2 Selecting projects -- So, how do I select projects?
Date: Sat, 11 Nov 2023 22:27:14 +0100

Hi.

It took me a while to find that Ada mode has a dedicated Info manual,
but now that I started reading it, I have a lot of questions. This one
seems to be the crux of my other problems I'm having with Ada mode.

I've never used project.el feature of Emacs. But, I found it
documented here:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Projects.html
. Not a lot of useful info, unfortunately.

>From my reading of both the manual linked above and the Info Ada Mode
manual, I figured that probably putting a file "project.prj" in the
root directory of my repository with the contents:

src_dir=/home/olegs/src/try-ada/test_project

should have the effect of specifying my project and its root directory.

I tried switching to it with C-x p p, and then looked in
~/.emacs.d/projects to confirm that it was added there.

However, when I run M-x wisi-prj-show in a buffer associated with a
source file of test_project, I get the output
home/olegs/src/try-ada/test_project/src (notice the "/src" at the
end).

Similarly, when I try to compile the project, it sets the wrong
directory as the current directory for compilation, fails to find my
gpr project, and as the result does something irrelevant.

On top of this, in various functions that rely on project (eg. all the
stuff that's related to xref) seem to be getting this bogus /
half-empty project object which leads to xref not working. Despite me
setting xref backend to gpr_query, the error I'm getting is that "gnat
find" isn't found.

On top of this, even though I set Emacs environment variables s.a.
GPR_PROJECT_PATH s.t. various gpr projects referenced in my code can
be found (eg. GNATCOLL), the highliging in the source code buffers
suggests that the parser cannot resolve these references. I'm not sure
this has to do with project settings, but it might be...

Anyways. My major problem with the title section of the manual is that
it doesn't tell how to select projects.  All functions mentioned in
this section aren't interactive functions and even though it seems
like these are intended to run as hooks, there doesn't seem to be a
generic way to handle this (what mode hook should I even add them to?)
 So, this manual page contains a lot of information, but it's missing
the crucial point which is answering the question it's set out to
answer. There's no way a user can read this section and understand how
a project can be selected.

So... how was this intended to work?

Thanks.

Oleg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]