From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 1e3b0f2: Improve doc strings of project.el Date: Sat, 20 Jun 2020 15:42:00 +0300 Message-ID: <83sgepvrhj.fsf@gnu.org> References: <87bllfqj82.fsf@warpmail.net> <83o8pfxhzq.fsf@gnu.org> <83imfnxgt3.fsf@gnu.org> <626efe11-0f9c-081b-11dd-0d61cee8168d@yandex.ru> <83h7v7xf7w.fsf@gnu.org> <831rmayj55.fsf@gnu.org> <6dc2c2ac-8e17-f044-dc78-8c109f936ad2@yandex.ru> <83wo42w83e.fsf@gnu.org> <6762abf5-71c1-aa54-1bac-d4c90c20870b@yandex.ru> <831rmavsuq.fsf@gnu.org> <87lfkhdim6.fsf@tcd.ie> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="14705"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, philip@warpmail.net, theo@thornhill.no, dgutov@yandex.ru To: "Basil L. Contovounesios" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 20 14:42:41 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jmcpV-0003k7-1t for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 14:42:41 +0200 Original-Received: from localhost ([::1]:45402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmcpU-0006qn-3y for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Jun 2020 08:42:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmcp0-0006DP-7a for emacs-devel@gnu.org; Sat, 20 Jun 2020 08:42:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38691) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmcoy-0004Uv-OC; Sat, 20 Jun 2020 08:42:08 -0400 Original-Received: from [176.228.60.248] (port=1138 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jmcoy-0003G0-6G; Sat, 20 Jun 2020 08:42:08 -0400 In-Reply-To: <87lfkhdim6.fsf@tcd.ie> (contovob@tcd.ie) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252442 Archived-At: > From: "Basil L. Contovounesios" > Cc: Dmitry Gutov , philip@warpmail.net, > theo@thornhill.no, emacs-devel@gnu.org > Date: Sat, 20 Jun 2020 13:30:57 +0100 > > > Doing this means we need some indicator other than default-directory. > > A buffer-local variable, perhaps, or membership in some data > > structure, like a list of buffers associated with a project. Or > > anything else, really, that can support better, more accurate > > decisions. There are many alternatives; my point is that basing this > > on default-directory is not the best strategy. > > What if grep, xref, etc. "singleton" buffers get created per project, > either automatically by detecting that they are called from within a > project, or by providing project.el wrappers for their respective > commands? That is something I suggested a few messages back, actually. > Then they could be switched to based on default-directory alone, > right? Would that fly at all? Why would we need the default-directory in this case? If these buffers are created to be project-specific, it would mean that they are somehow different from one another, right? We could then use these differences directly to tell which ones are related to a project. For example, the names of these buffers could include the project ID, or some buffer-local variable could do that. Once again, default-directory is too random to be a strong evidence in this case. It will cause too many false positives and false negatives.