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 support and completions Date: Mon, 26 Jan 2015 12:51:34 -0600 Message-ID: <85ppa1bcjt.fsf@stephe-leake.org> References: <8361cucl3u.fsf@gnu.org> <54C063E3.8020401@yandex.ru> <83a91avglz.fsf@gnu.org> <54C1655E.4050403@yandex.ru> <83r3uluawd.fsf@gnu.org> <54C28635.8070606@yandex.ru> <83twzhryyq.fsf@gnu.org> <54C2C9DC.1050908@yandex.ru> <83h9vgsehi.fsf@gnu.org> <54C3E7B6.2020006@yandex.ru> <837fwbstls.fsf@gnu.org> <83zj96rgs3.fsf@gnu.org> <83k30ar7dk.fsf@gnu.org> <54C576B3.20005@yandex.ru> <54C5C12E.7050708@yandex.ru> <83zj95phur.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422298352 12808 80.91.229.3 (26 Jan 2015 18:52:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2015 18:52:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 26 19:52:30 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 1YFolx-0008Jl-GR for ged-emacs-devel@m.gmane.org; Mon, 26 Jan 2015 19:52:29 +0100 Original-Received: from localhost ([::1]:43445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFolw-0000Gy-TP for ged-emacs-devel@m.gmane.org; Mon, 26 Jan 2015 13:52:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFolO-0007pY-6u for emacs-devel@gnu.org; Mon, 26 Jan 2015 13:51:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFolJ-0006p3-83 for emacs-devel@gnu.org; Mon, 26 Jan 2015 13:51:54 -0500 Original-Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:58509) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1YFolJ-0006o9-0t for emacs-devel@gnu.org; Mon, 26 Jan 2015 13:51:49 -0500 Original-Received: (qmail 2888 invoked by uid 0); 26 Jan 2015 18:51:43 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy8.mail.unifiedlayer.com with SMTP; 26 Jan 2015 18:51:43 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw3 with id kirf1p00S2UdiVW01irinf; Mon, 26 Jan 2015 11:51:43 -0700 X-Authority-Analysis: v=2.1 cv=BqwOn+n5 c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=TeMFXEv2S7AA:10 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=jrwKn-8xaegA:10 a=YNv0rlydsVwA:10 a=mDV3o1hIAAAA:8 a=nmTsljQpo_PDlnTfnwkA:9 a=KbmX8ozFipKL4pD0:21 a=deZJy7vpBaCSL-14:21 Original-Received: from [70.94.38.149] (port=50257 helo=takver) by host114.hostmonster.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82) (envelope-from ) id 1YFol8-00053K-Ug for emacs-devel@gnu.org; Mon, 26 Jan 2015 11:51:39 -0700 In-Reply-To: <83zj95phur.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Jan 2015 19:33:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 70.94.38.149 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 67.222.33.93 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:181798 Archived-At: Eli Zaretskii writes: >> From: Stefan Monnier >> Cc: Eli Zaretskii , emacs-devel@gnu.org >> Date: Mon, 26 Jan 2015 10:07:48 -0500 >> >> >> Which decision? >> > Whether to make the second project active as soon as I visit a file in >> > it. Assuming you use Eli's meaning of "active" (used for completion and >> > navigation in all (?) buffers). >> >> No, a project would be only ever active in the buffers related to it > > In some use cases, this would be an annoying limitation. So we need a > fire escape for those. > >> (plus in the buffers related to no project at all, but in that case the >> user has to choose which project to use, unless there's only one). > > For each such buffer? If so, that's again an annoyance. > > I don't really understand the rationale behind this design. How > frequently (in time units) do you switch from one project to another? > Unless you do that several times a minute, I cannot see why would we > want this automation. > > Me, I change project maybe once or twice a day, sometimes once a > week. With such a low frequency, I don't need the automation too > much, but I do need the freedom to do project-related stuff from any > buffer I happen to be in. Maybe I'm the odd one out. In ada-mode, I use the compiler defined project definition files to define Emacs projects. One file can belong to several projects, due to project nesting. For example: common base file_1.ads MAP models file_2.ads MMS models file_3.ads file_2.ads and file_3.ada both depend on file_1.ads, but MAP and MMS are different (high-level) projects The file common/base/file_1.ads belongs to the "common", "MAP", and "MMS" projects. I have no automation to select the project; the user must always choose; I usually put a file local expression in the Makefile for each project to set that project initially. But after I have several Makefiles open, I switch between projects manually. And I like it that way. The list of projects that Emacs knows about (ie, whose project definition files have been parsed) is available on an ada-mode menu, so it's easy to switch between projects. ada-mode projects are actually multi-language; they include C and C++, and anything else the user has told the compiler project file about. On the other hand, I do edit elisp code (to fix ada-mode, for example) while I am editing Ada code. So it might be nice to have Emacs switch between "the current elisp project" and "the current real project" automatically. Maybe based on major mode? ie "the current real project" includes all buffers with ada, C, or C++ mode. In my case, those languages are listed in the compiler project file, so that is at least possible to implement without further user work. But I suspect this is a _very_ special case :). If there is project choosing automation, it must be possible to turn it off or override it in some way. I have not been following this thread closely; is there a proposed API somewhere? -- -- Stephe