emacs-devel
[Top][All Lists]
Advanced

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

Re: make project--find-in-file generic, add interactive filename to proj


From: Dmitry Gutov
Subject: Re: make project--find-in-file generic, add interactive filename to project-find-file
Date: Sat, 30 Jan 2016 03:15:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

On 01/30/2016 02:55 AM, Stephen Leake wrote:

I have not thought about that at all. I never felt like I wanted to do
it.

I think I did, once or twice over the last few weeks. Projectile includes such command, so putting directories into the completion table might be considered useful. Anyway, no hurry, we're still allowed to break things.

> Part of the point of project-find-file is that it allows me to
> _ignore_ the directory structure.

And you'd be able to "ignore" it to an extent, when visiting directories, by only typing a directory's base name, if it's unique.

I don't think we'll introduce any danger to visit a directory when you wanted to visit a file, this way.

I find it cleaner to have a separate cl-defgeneric, so the doc string is
clearly about the generic requirement, and not the default
implementation.

You've got a point, but I somewhat prefer them to be kept together: less indirection, easier to follow the most common flow of code.

More importantly, both project-ignores and (actually) project-external-roots define their default implementations inline. I think it's better to keep to one style.

And it leaves the default implementation in the same place in the file,
so the git diff is smaller and more usefull.

I'd just put the cl-defgeneric where the defun was, really.

Pushed.

Thanks.



reply via email to

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