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: Sun, 22 Nov 2015 16:04:21 -0600 Message-ID: <86oael4roa.fsf@stephe-leake.org> References: <86pp1j4ejm.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> <86h9kf655z.fsf@stephe-leake.org> <56515443.70408@yandex.ru> <5651597B.5090303@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448229899 14456 80.91.229.3 (22 Nov 2015 22:04:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Nov 2015 22:04:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 22 23:04:47 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 1a0ckZ-0003Za-6s for ged-emacs-devel@m.gmane.org; Sun, 22 Nov 2015 23:04:47 +0100 Original-Received: from localhost ([::1]:57671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ckZ-00044j-9f for ged-emacs-devel@m.gmane.org; Sun, 22 Nov 2015 17:04:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0ckV-00043b-9q for emacs-devel@gnu.org; Sun, 22 Nov 2015 17:04:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0ckS-000803-2u for emacs-devel@gnu.org; Sun, 22 Nov 2015 17:04:43 -0500 Original-Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:45701) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1a0ckR-0007zx-Rp for emacs-devel@gnu.org; Sun, 22 Nov 2015 17:04:40 -0500 Original-Received: (qmail 12490 invoked by uid 0); 22 Nov 2015 22:04:30 -0000 Original-Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy6.mail.unifiedlayer.com with SMTP; 22 Nov 2015 22:04:30 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by CMOut01 with id km4P1r00P2UdiVW01m4SBp; Sun, 22 Nov 2015 15:04:29 -0700 X-Authority-Analysis: v=2.1 cv=VOBOwb/X 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=pGLkceISAAAA:8 a=vaJtXVxTAAAA:8 a=fCEYKWg1mbAfvnBH310A:9 Original-Received: from [76.218.37.33] (port=50102 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1a0ckC-0007nT-BQ; Sun, 22 Nov 2015 15:04:24 -0700 In-Reply-To: (John Wiegley's message of "Sun, 22 Nov 2015 08:55:40 -0800") 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:195074 Archived-At: John Wiegley writes: >>>>>> Dmitry Gutov writes: > >> Or, vice versa, some other third-party package can only expect the >> "recursive" kind of directories, and traverse them that way. That would work >> fine on most projects out there, but would lead to undesirable effects if >> someone tried to use it with the Ada backend. > > I'm still not sure why this means we need to encode restrictions within > project.el, rather than, say, in Ada mode, or whichever other mode is > providing information to project.el for the traversal of its related elements. > >> IME, freedom rarely implies correctness. > > I want as much freedom of expression as we can get away with, so long as the > default and expected use cases remain easily within reach. > > I feel, though, as if I've lost my grip on the vision for this project > again. Me too. > As I understand it, it has two main components: > > 1. Ways to determine members of a project. > 2. Ways to usefully apply this information. Yes. > I think our discussion so far have been in the area of #1 only, right? And is > that because we're stuck on how to define membership? My impression is Dmitry is stuck on not accepting other valid use cases as requirements. > As long as, at the level of project.el, membership can optionally be a list of > "collection functions", this would allow near infinite expressiveness while > not detracting from the standard use cases of recursive and non-recursive > directory traversals. Are we still talking about emacs 25? this would be a big change from the current API. > I don't think we gain anything by "baking in" what membership means, and > disallowing flexible definitions. Such a road leads us to continuing to have > to extend and hack project.el's interface, as users run into the limits of > what it can express. Which Stefan already has done with ada-mode. I think you've confused "Stefan" with "Stephen". On the other hand, I don't know what part of ada-mode you are refering to, so maybe you are talking about Stefan? > We shouldn't even be discussing ada-mode! I only bring it up as an example of what a project can be used for, and therefore what project.el should support. > There is a simple design path that can allow Stefan to define his > project contents however he wants. Such questions should not even be > an issue at this level of the API. I don't follow. My approach is this: I should be able to rewrite the user interface of the project-related portions of the current ada-mode on top of the project.el API, while also adapting the current ada-mode code to provide a project.el backend. If I can do that, then those UI functions will be generally useful with other project backends (I can reuse them on Java projects, etc). This imposes requirements on the project.el API. I agree the requirements should not be written in terms of ada-mode; ada-mode is just one use case. Looking at this another way; you seem to be saying "a project backend can implement `project-roots' (or any other project function) to return anything it wants". I don't think that works. That would mean the project definition for `project-roots' would be: (cl-defgeneric project-roots (project) "Return some backend-defined information.") How would client code, that is supposed to be backend agnostic, use this function? I don't understand what you mean by "define project contents however he wants". -- -- Stephe