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

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

bug#45134: Add project-switch-project-by-name


From: Rudolf Schlatte
Subject: bug#45134: Add project-switch-project-by-name
Date: Wed, 09 Dec 2020 16:47:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)

Rudolf Schlatte <rudi@constantly.at> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Rudolf Schlatte <rudi@constantly.at> writes:
>>
>>> +(defun project-switch-project-by-name (project-root)
>>> +  "\"Switch\" to the project in PROJECT-ROOT and run an Emacs command.
>>
>> But is this the best name for this function?  PROJECT-ROOT isn't the
>> name of the project, but a directory.
>
> You mean the argument name?  Fine with renaming that - PROJECT-DIR or
> DIR are all ok (DIR is used in ‘project-switch-project’ just above the
> added function, so maybe that’s best).
>
> Even though the argument is a directory, I chose the function name
> ‘project-switch-project-by-name’ to stay close to projectile, which uses
> ‘projectile-switch-project-by-name’ for the analogous function.

L’esprit d’escalier kicking in ...  Of course it’s also fine to use
another function name; internal naming consistency is as important as
consistency with another project.  I’ll leave it up to the maintainers,
with thanks for considering the patch.  :)






reply via email to

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