help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Navigating an enormous code base


From: John Yates
Subject: Re: Navigating an enormous code base
Date: Tue, 26 Apr 2022 08:53:48 -0400

On Tue, Apr 26, 2022 at 7:03 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> In what language(s) is this written?

Primarily C++.  But there are Makefiles, bash scripts, ad hoc text
files, xml, json, etc.

> Can you tell more about what you mean by "how I find files"?  Like
> show an example or two of use cases where you need to 'find files"?

Within the current project I want to open a specific
suite_registraction.cpp in one of multiple unittest/
or pkgtest/ directories.

In some project, could be the current project, could be a sibling
project, I want to open a specific file.

My goal is not so much navigating by symbols (I have lsp for
that). Rather it is more of a UI question. I want to use a modern
completion interface to open files by name. Supporting completion
requires that the space of possible file names be indexed and
supplied to the completion function.

As mentioned in my first post, an issue is how should the
completion UI present files with duplicate names.

Another issue is what should be the scope of file name (paths)
fed to the completion UI. Here I can imagine the following
possibilities:
* The current project
* An explicitly specified sibling project
* Within the current workspace, all projects in which I have made
  changes (perhap via after-save-hook)
* One of various pre-specified canned sets of projects

I could imagine splitting this UI into:
* Find in current project
* Find within a menu of wider contexts

> And what built-in tools did you try to solve those problems?

I have not tried any built-in tools yet.  I do have a private
wsf.el (WorkSpace Files) package that indexes as much of a
workspace as I am ever likely visit:

    https://github.com/jsyjr/wsf/blob/main/wsf.el

It is single threaded and rather slow (10 minutes to index a
workspace on a local SSD).  Currently I use ivy to browse the
index and open files.  Loading and caching the index in memory
takes 5 or 10 seconds.  (There can only be one workspace active
at any time.)  Once loaded, ivy interactivity is not great.

I am now using the whole vertico / marginalia / corfu / etc stuff
and want to ditch using ivy with my wsf.  Ideally I would like to
ditch wsf as well.  Hence this posting.



reply via email to

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