|
From: | Dmitry Gutov |
Subject: | Re: make project--find-in-file generic, add interactive filename to project-find-file |
Date: | Fri, 29 Jan 2016 05:18:29 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 |
On 01/28/2016 02:06 PM, Stephen Leake wrote:
That works nicely; new patch attached.
Please install, with the following adjustments:
+(cl-defgeneric project--file-completion-table (_project _dirs)
Let's call it project-file-completion-table (no double-dash). A private generic function is an oxymoron.
Should this table also include directories, BTW? That shouldn't make a difference in performance, and then we could add a project-dired command. Or just open Dired from project-find-file if the input is a directory (directories are files, too).
+ "Return a completion table for files in directories DIRS in PROJECT. +If non-nil, DIRS is a list of absolute directories; it should be some +subset of the project roots and external roots. If nil, the backend +uses all the directories it knows about.
Why should we allow DIRS to be nil, and ask all backends to deal with that? Nobody passes nil to it. Out default implementation doesn't handle nil there.
+PROJECT is used to find the project ignores and other project meta-data." + )
Why not put the default implementation here? There's no need for the separate cl-defmethod declaration.
[Prev in Thread] | Current Thread | [Next in Thread] |