From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: project.el semantics Date: Thu, 19 Nov 2015 04:21:23 +0200 Message-ID: <564D3223.1050705@yandex.ru> References: <86pp1j4ejm.fsf@stephe-leake.org> <86mvwmz58h.fsf@stephe-leake.org> <55F9A5F8.1030505@yandex.ru> <86pp1ixem2.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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1447899720 26813 80.91.229.3 (19 Nov 2015 02:22:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2015 02:22:00 +0000 (UTC) Cc: John Wiegley , emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 19 03:21: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 1ZzEqu-0001YP-Ti for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2015 03:21:37 +0100 Original-Received: from localhost ([::1]:39211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzEqu-0000CF-En for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2015 21:21:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzEqq-0000C8-0W for emacs-devel@gnu.org; Wed, 18 Nov 2015 21:21:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzEql-0000e2-3L for emacs-devel@gnu.org; Wed, 18 Nov 2015 21:21:32 -0500 Original-Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:34773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzEqk-0000dj-TI for emacs-devel@gnu.org; Wed, 18 Nov 2015 21:21:27 -0500 Original-Received: by wmvv187 with SMTP id v187so4214658wmv.1 for ; Wed, 18 Nov 2015 18:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=1mOOZJDBruSCR8XJvqAmrrTzO+7wMxJ4SxBg3Knr+Lc=; b=Az/WrogaNnv2IFUKBdBp8uV08tD7vGQynITjrFEBCpMRZrGyJwJtPiLzK+9uxXvkzf EDRH0EDhbvd27NKK3p2FAg1jnv/83BYnPs5vTszGL6JT7gSTUt0RM3MpqottlPIu2Mi8 9QQfVRQebjFqiCXPC0Z3w0D+7KM31CyGA0fmmBX4IVH28pFh/WKJYfv6wi5p/UG3No+5 dYWWkxCOPR7Y/pZqYuUysnxJYxV/7nfR7AnjYeI7geWTOxLVqELB0ipskZLVm40vRZNz FCZaDYTaqatT4ZEJBLI0x7ZE2X+qKcSKW3j47nyLTXDVbOQPAkxLHspxWYemngRNLWHE gZ1w== X-Received: by 10.194.90.50 with SMTP id bt18mr5284585wjb.118.1447899686234; Wed, 18 Nov 2015 18:21:26 -0800 (PST) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id pn6sm5492654wjb.15.2015.11.18.18.21.24 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Nov 2015 18:21:25 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 In-Reply-To: <56450CDB.9050604@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::231 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:194769 Archived-At: 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. - 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. - What's the category name for the directories that are the project roots in the current interpretation? Internal? Bigger one: - If each directory is supposed to be categorized, and the set of categories is flexible, what's going to be the counterpart to `project-library-roots-function'? Do we call it project-roots-function, and allow it to return a list of uncategorized strings, which each project-directories impl must merge in? Or do we allow a new variable which would return a buffer-local project (adhering to the same API), which the "real" project would delegate to? Alternatively, I'm inclined to mix the first option with demoting project-roots-function to project-vc-directories (a mixed list of strings and functions). One fewer wart in the API, and the list would be directory-local, instead of buffer-local. We can also mix 2 and 3 (project-vc-directories might contain language-specific backends, as well as strings), but that's probably too weird.