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: cl-defgeneric vs random funcall in project.el Date: Thu, 30 Jul 2015 20:16:13 +0300 Message-ID: <55BA5BDD.1080009@yandex.ru> References: <86oaiwa57v.fsf@stephe-leake.org> <55B79B3F.1060200@yandex.ru> <86wpxj93r2.fsf@stephe-leake.org> <55B82A0C.5040709@yandex.ru> <86fv4782k2.fsf@stephe-leake.org> <55B92F76.7060104@yandex.ru> <86380686sm.fsf@stephe-leake.org> <55BA0AC4.7060906@yandex.ru> <86mvyd7jf0.fsf@stephe-leake.org> 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 1438276591 12425 80.91.229.3 (30 Jul 2015 17:16:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2015 17:16:31 +0000 (UTC) To: Stephen Leake , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 30 19:16:27 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 1ZKrRS-0006Yh-HQ for ged-emacs-devel@m.gmane.org; Thu, 30 Jul 2015 19:16:26 +0200 Original-Received: from localhost ([::1]:41197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKrRR-0007cm-A9 for ged-emacs-devel@m.gmane.org; Thu, 30 Jul 2015 13:16:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKrRN-0007bs-2Y for emacs-devel@gnu.org; Thu, 30 Jul 2015 13:16:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKrRI-0004Gt-2V for emacs-devel@gnu.org; Thu, 30 Jul 2015 13:16:20 -0400 Original-Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:33412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKrRH-0004Gg-Qm for emacs-devel@gnu.org; Thu, 30 Jul 2015 13:16:15 -0400 Original-Received: by wicmv11 with SMTP id mv11so29269269wic.0 for ; Thu, 30 Jul 2015 10:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=zJkSK7Sk1IqmXzKefoGrJZhKkUEyX1Y9SZXHKH/lzhA=; b=Q14FqZRhQM5BLRCdVI+OqCFX3fyUyC01cqUsM2XGQFdgmNpQpLc9X78m4+oD6TrY1v byTsw3Y+H6IEbDj0yzCYgjaS+AVue7osqRxKDRLeVLG4lNYcoRXafYrT5cF4E2os5X8P uuH+wBbq6gn+S2hANyH0Yvux5kYj3Fe/ohRyMFmJlfaFXlGjYUq7ACCMRoSNpb43k34I HG5WILJEuzZaRfrMLumq065MuZsnZLweHz6TT+3AhLm5uzUcsUUWsDWmFpWaO2Et2WQ4 gMGQtrst+sQ5oxx+nfJTsfbKoQ+b/6rhQcnSfvxz8/GvTjGQxZ+ALLlg10NPVxRcN5Pl 0f1w== X-Received: by 10.180.72.35 with SMTP id a3mr7943861wiv.21.1438276575180; Thu, 30 Jul 2015 10:16:15 -0700 (PDT) Original-Received: from [192.168.0.185] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by smtp.googlemail.com with ESMTPSA id ny7sm130487wic.11.2015.07.30.10.16.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2015 10:16:14 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <86mvyd7jf0.fsf@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22a 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:188201 Archived-At: On 07/30/2015 06:29 PM, Stephen Leake wrote: > The point of a "project backend" is that it knows _everything_ about the > project. No stray hooks for users to pervert things. The problem is I (and others) have a lot of Elisp projects which don't adhere to some particular structure. No particular project files, aside from a .git repo, and maybe Makefile, or maybe some other -file. It's not even easy to identify it: maybe there are some .el files in the root directory, but they might all be in a subdirectory. I want to support this use case. > I would write the vc implementation of project-search-path to return a > flat list of all the directories under the vc root. The flat list is really out of the question. It really goes against my intuition and every project backend will have to implement the logic of producing this flat list based on some roots and a list of ignores. We won't be able to use rgrep on the resulting directories, but we'd still have to handle ignored files. I'd rather project-ignores was powerful enough to describe the majority of cases, and xref-find-regexp knew how to interpret that list. > Right. The elisp project backend is incomplete. It's not a backend. Like described above, it would be hard to even write a reasonably efficient project-find-functions element for such a backend. What will it do? Recursively scan the VC repo for .el files? > That's one problem with using two dispatching mechanisms; it's too easy > to get mixtures of incomplete implementations that "seem to work". I'd call it "composability". :)