From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: project.el semantics Date: Sat, 21 Nov 2015 04:03:04 -0600 Message-ID: <86h9kf655z.fsf@stephe-leake.org> References: <86pp1j4ejm.fsf@stephe-leake.org> <55FAFC36.5010506@yandex.ru> <86twqrww0u.fsf_-_@stephe-leake.org> <563EA9B9.5080404@yandex.ru> <86vb9dufs0.fsf@stephe-leake.org> <563F4915.1080008@yandex.ru> <867flrbksb.fsf@stephe-leake.org> <56409F2D.9060300@yandex.ru> <86mvun9gz7.fsf@stephe-leake.org> <56415902.90103@yandex.ru> <86h9ktah9x.fsf@stephe-leake.org> <56429025.3070008@yandex.ru> <86r3jw4yrf.fsf@stephe-leake.org> <564340DC.5020008@yandex.ru> <86wptob2v6.fsf@stephe-leake.org> <5643CEAA.6000103@yandex.ru> <86si4bemyw.fsf@stephe-leake.org> <564478CA.20108@yandex.ru> <86y4e3c90y.fsf@stephe-leake.org> <56450CDB.9050604@yandex.ru> <564D3223.1050705@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448100228 29465 80.91.229.3 (21 Nov 2015 10:03:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2015 10:03:48 +0000 (UTC) Cc: John Wiegley , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 21 11:03:38 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a0516-0007ty-BI for ged-emacs-devel@m.gmane.org; Sat, 21 Nov 2015 11:03:36 +0100 Original-Received: from localhost ([::1]:51718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0515-0003Ge-VB for ged-emacs-devel@m.gmane.org; Sat, 21 Nov 2015 05:03:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0511-0003Ei-SL for emacs-devel@gnu.org; Sat, 21 Nov 2015 05:03:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a050w-00009b-St for emacs-devel@gnu.org; Sat, 21 Nov 2015 05:03:31 -0500 Original-Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:44519) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1a050w-00007w-LL for emacs-devel@gnu.org; Sat, 21 Nov 2015 05:03:26 -0500 Original-Received: (qmail 1355 invoked by uid 0); 21 Nov 2015 10:03:22 -0000 Original-Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy6.mail.unifiedlayer.com with SMTP; 21 Nov 2015 10:03:22 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw4 with id kA3E1r00K2UdiVW01A3HEb; Sat, 21 Nov 2015 03:03:22 -0700 X-Authority-Analysis: v=2.1 cv=IekUBwaa c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=qtqOOiqGOCEA:10 a=vaJtXVxTAAAA:8 a=68m-JQmgKkB-uBMetdkA:9 Original-Received: from [76.218.37.33] (port=65121 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1a050k-0004WB-A9; Sat, 21 Nov 2015 03:03:14 -0700 In-Reply-To: <564D3223.1050705@yandex.ru> (Dmitry Gutov's message of "Thu, 19 Nov 2015 04:21:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 67.222.39.168 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194936 Archived-At: Dmitry Gutov writes: > On 11/13/2015 12:04 AM, Dmitry Gutov wrote: > >> Please feel free to submit a patch across these lines (adding >> project-metadata). It might be moot now, given that John decided to pull >> project.el from Emacs 25.1, but it could at least serve as a point of >> comparison for his project API proposal. > > Scratch that. John and I had a chat, and it seems project.el has a > chance in Emacs 25.1, provided it's changed along the lines we've been > discussing here. > > I've had some thoughts since. > > Some minor things: > > - We'll probably want to rename `project-roots' to > `project-directories'. Even though they'll be treated like "roots" > (traversed recursively) most of the time, a project backend can return > different kinds of directories in this list, including certain > subdirectories of the project root(s). > > For instance, in can include the test roots in there. Or, I don't > know, some other kinds of directories that aren't supposed to be > traversed recursively. Then it also needs to indicate which are recursive and which aren't. One way is to return a cons (recursive-dirs . non-recursive-dirs). What is the use case for this? We have two major use cases for "the list of directories in a project": 1) call "find" in an external process - this wants only the roots, together with ignores. 2) iterate over each directory in elisp - this wants all the directories, one at a time. 1 is satisfied by project-all-roots (ie (append (project-roots prj) (project-library-roots prj))) and project-ignores. Allowing project-all-roots to return non-roots breaks this case. 2 is not supported directly. It is not simple to get the list of all directories from project-all-roots and project-ignores. For Emacs 25, we should keep this as simple as possible; provide two functions, one that returns all recursive roots and ignores, another that returns a non-recursive list of all directories. Backends can provide whichever is convenient; project.el can convert between them. > - If we're only documenting the "categories" key inside > project-metadata, why not have a project-directory-categories method > instead? We can add the -metadata method, too, now or later. This should wait for Emacs 26; we don't have a solid proposal. -- -- Stephe