emacs-devel
[Top][All Lists]
Advanced

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

Re: New feature in project.el: Remembering the previously used projects


From: Simen Heggestøyl
Subject: Re: New feature in project.el: Remembering the previously used projects
Date: Thu, 04 Jun 2020 20:33:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 04.06.2020 01:34, Juri Linkov wrote:
>
>> While using this new feature, I discovered that switching projects
>> by directory is not quite handy, directory strings are too long
>> and begin with the same prefix.
>
> Interesting. It's not really the case here, but I imagine how it is
> possible to be true for many people.

Same. I'm using Ivy for completion though, maybe that plays a role.

>> I think there is a need for an additional command to switch projects by name.
>> A clear advantage of Lisp data is that in this case project names
>> could be saved in the same file ~/.emacs.d/projects, e.g.:
>>    (("/project/path/"
>>      (name . "Project name"))
>> or after implementing the proposal from bug#41572 to use
>> .dir-locals.el,
>> then maybe to save the project name in .dir-locals.el like
>>    ((nil . ((project-name . "Project name")
>
> That's an option, but I wonder if we could do without it:
>
>> A separate question is how to assign a name to a project.
>
> One way to avoid that, is to generate project names on the fly, in a
> uniquify fashion. If base directory names are unique, use those. 
> Otherwise, prepend their parent names, and so on.
>
> And we won't need a separate command.

Generating the names on the fly in a uniquify fashion sounds like good
idea to me (in the beginning this feature feature actually did just
that, but I later changed it to what we have now for simplicity).

> The exact strategy could be a user option, though.

Yep. I imagine different ways the name could be derived from the path
automatically (also supporting name = path like we have now), and maybe
even an option to let users specify the name manually whenever a new
project is encountered.

Juri Linkov <juri@linkov.net> writes:

>> Maybe it should be renamed from "project-list" to simply "projects" too
>> while we're at it, to match similar files, like "places", "bookmarks",
>> and so on?
>
> Indeed, "projects" is much better.  "project-list" looks like that ugly
> directory name "\Program Files" that caused much trouble to people on
> MS-Windows whereas it should have been named just "\Programs".

Done.

-- Simen



reply via email to

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