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: cl-defgeneric vs random funcall in project.el Date: Sat, 01 Aug 2015 14:08:12 -0500 Message-ID: <86fv42j083.fsf@stephe-leake.org> 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> <55BA5BDD.1080009@yandex.ru> <86k2thz0dw.fsf@stephe-leake.org> <55BAC366.1010803@yandex.ru> <86fv44z94l.fsf@stephe-leake.org> <55BBFC3E.2010405@yandex.ru> <86h9ojjoll.fsf@stephe-leake.org> <55BCB6E5.2040804@yandex.ru> <86wpxfhyzm.fsf@stephe-leake.org> <55BCF888.4020907@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438456132 18636 80.91.229.3 (1 Aug 2015 19:08:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2015 19:08:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 01 21:08:41 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 1ZLc9A-0003pG-PN for ged-emacs-devel@m.gmane.org; Sat, 01 Aug 2015 21:08:40 +0200 Original-Received: from localhost ([::1]:54511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLc99-0006aM-BG for ged-emacs-devel@m.gmane.org; Sat, 01 Aug 2015 15:08:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLc8w-0006ZW-Mo for emacs-devel@gnu.org; Sat, 01 Aug 2015 15:08:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLc8r-00060l-Nf for emacs-devel@gnu.org; Sat, 01 Aug 2015 15:08:26 -0400 Original-Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]:44391) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZLc8r-00060f-HO for emacs-devel@gnu.org; Sat, 01 Aug 2015 15:08:21 -0400 Original-Received: (qmail 19402 invoked by uid 0); 1 Aug 2015 19:08:19 -0000 Original-Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy4.mail.unifiedlayer.com with SMTP; 1 Aug 2015 19:08:19 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by CMOut01 with id zX8E1q00y2UdiVW01X8HCG; Sat, 01 Aug 2015 13:08:18 -0600 X-Authority-Analysis: v=2.1 cv=NJxGpSKg 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=y7kgw_RnJtkA:10 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=uRRa74qj2VoA:10 a=vaJtXVxTAAAA:8 a=V_Fz6gXZnsoPIEj60hMA:9 Original-Received: from [76.218.37.33] (port=51317 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZLc8l-0007KR-Bt for emacs-devel@gnu.org; Sat, 01 Aug 2015 13:08:15 -0600 In-Reply-To: <55BCF888.4020907@yandex.ru> (Dmitry Gutov's message of "Sat, 1 Aug 2015 19:49:12 +0300") 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: 69.89.23.142 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:188283 Archived-At: Dmitry Gutov writes: > On 08/01/2015 05:20 PM, Stephen Leake wrote: > >>> Not at all, they need variables. You can easily set the variables from >>> .dir-locals.el, and any Emacs-wielding team member on the same project >>> will use them automatically. >> >> Ok, I agree they could be variables. > > Thinking about this more, buffer-local variables have their own > complications: > > - You need an buffer open, inside the given directory tree, to get > their values. The project-find-functions API just passes in DIR to get > a project instance. There might not even be a buffer open in that > directory. > > - If a user tries to set their values in init.el, that won't end well. > >> The point is the name should be declared in project.el, so all backends >> use the same name. > > You can't reuse the variables. There might be several project > instances open at the same time. Yes; I assumed the variables would be read once by some project-create function. But that's one reason why I proposed functions in the first place. > The best bet seems to be to store them in the project file, which a > project backend reads and saves to the project instance's slots. Yes. > Not sure what this means for the VC project backend. Git allows > storing arbitrary key-value pairs in .git/config via 'git config', but > that isn't true for every VCS. Bazaar doesn't, AFAICT. I would not mess with .git/config; that's not an Emacs project file, nor is it intended to be one. It might be useful to read some info from it, but there must be a separate Emacs project file. -- -- Stephe