[Top][All Lists]

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

Re: new elpa packages for ada-mode project related stuff

From: Dmitry Gutov
Subject: Re: new elpa packages for ada-mode project related stuff
Date: Thu, 17 Jan 2019 05:31:41 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0

On 16.01.2019 21:57, Stephen Leake wrote:
I'd like to create one or more new ELPA packages to support the ada-mode
project code.

The new files are:
env-project.el -- 70 lines
     Adds three new project defgenerics:

     These should be in project.el in some future version of emacs.

I don't think so.

project-refresh is debatable, but when would the user want to call it? There's no way for them to know. It'd be much better to use caches with proper automatic invalidation, e.g. with filenotify. IOW, I'd like to see the feature in the wild, in different project backends, and then we can incorporate it.

But project-select and project-deselect, as previously discussed, can be implemented in terms of project-find-functions. If you and some other users find it handy to have an Emacs-wide global project and select it manually, be my guest, but please make it a globalized minor mode, and add a project-find-functions entry for it. The said minor mode can have its own commands to -select and -deselect.

     Then defines a project defstruct that declares/undeclares
environment variables when it is selected/deselected. ada-mode project
inherits this.

Err, I'd rather have it user explicitly in certain functions like Stefan discussed, rather than invisibly change env variables in the whole session.

path-iterator.el -- 243 lines
     Provides an iterator for directory paths; returns one file at a
     time. Handles a mix of flat and recursive directories.
     Probably should be rewritten to use generator.el.

Why an iterator, though? And not just a list?

If it's used in a completion table, surely the whole sequence will have to be realized anyway the first time user types TAB.

uniquify-files.el -- 687 lines
     Provides a completion style and completion table that presents
     uniquified file names to the user for completion.
     Uses path-iterator.el
     ada-mode project-file-completion-table uses this.

I wrote my feelings on that subject in a separate email. A neat feature, I'm sure, but I'd prefer if it were implemented in a radically different way.

reply via email to

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