From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#63870: 29.0.90; project.el can't dynamically populate the project list Date: Sat, 17 Jun 2023 05:55:59 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14905"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 To: Spencer Baugh , 63870@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 17 04:57:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qAM7k-0003gi-0G for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Jun 2023 04:57:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAM7c-0005Ig-4X; Fri, 16 Jun 2023 22:57:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAM7a-0005IF-7J for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 22:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAM7Z-0007zO-V5 for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 22:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAM7Z-00054z-Qw for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 22:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Jun 2023 02:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63870 X-GNU-PR-Package: emacs Original-Received: via spool by 63870-submit@debbugs.gnu.org id=B63870.168697057119456 (code B ref 63870); Sat, 17 Jun 2023 02:57:01 +0000 Original-Received: (at 63870) by debbugs.gnu.org; 17 Jun 2023 02:56:11 +0000 Original-Received: from localhost ([127.0.0.1]:50661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAM6k-00053j-Kd for submit@debbugs.gnu.org; Fri, 16 Jun 2023 22:56:10 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:49291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAM6i-00053V-0e for 63870@debbugs.gnu.org; Fri, 16 Jun 2023 22:56:08 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 5212F320076F; Fri, 16 Jun 2023 22:56:02 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 16 Jun 2023 22:56:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1686970561; x=1687056961; bh=8UowMyp/s7QQW2MzyitU/E2/CLOYZkMsWVd JR0/8KyY=; b=G8ia4Qncz/vfBhdhYXdAnEjCLSOU8QV7Sx3FTolTZljUAHXx/uN 2ryrySyEd1qlO06RrnuUac8PtphdVv7tqKLZR7ci22ogTlyKxAaoNvbh7YE2qRez /IU8h1qcvvDq/agBb4Ksl3sJ0RVN3msBeCGAewSqScyi1S9HwLMeYmBurp7VsXlN pFxcFzId9DQxMlwspxNORcdG8NPtt1PuMc2ShnYozG82E2JTHeOgHu9bLYSicT61 OjwW9vMsUaV/FBEZgy73vyndT8yc/GHZTu8FXFi8I4KZcedMMSvze/LhwQhaLz28 X3jk5wUtByZais9DQAcg+TVnEJw5lzuTJoQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1686970561; x= 1687056961; bh=8UowMyp/s7QQW2MzyitU/E2/CLOYZkMsWVdJR0/8KyY=; b=V 2bZXBIWMJQmH1WwRZXBcgniPRZlLNKLnmmfwnpqHDy7GifSapdB/FnrJHdREYSYU hFokmWTWlCDSFtWJlTQh4IY6SMWwVYRXUEezK01eYBqm8mKXOqIc0WUFS1HOARFf wDtV7q1Oz54liYTGE11KMaZ8HrjRpGFhPtqlGhEOdpOxKckIwdF9kzYLtG9Dq5wL Y4+nZD8sTAOOtrwr7C7DugPKDd2+RE08RJ759CIy1rblNMgX6xckWGDD/uIpG1kf j0Q/DpdLlAhpWB/9C2uS4BTMvl8D3cbG4rsYOeUD5/Xa2wAEwfPYUmT3m7a09c/W gSXY/wtXCSnyPA91eNgxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedviedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeghedthedujeeiteeutddtjeekheejteeukeehffdutdejuedvfeevueeviedu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 16 Jun 2023 22:56:00 -0400 (EDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263499 Archived-At: Hi! On 03/06/2023 14:55, Spencer Baugh wrote: > I'd like a customization point where I can supply a function (or list of > functions) which project-known-project-roots should run to produce an > additional list of project root directories, which should then be > appended to project--list. Are you sure the existing functions won't cut it? Such as project-remember-project and project-forget-project. The names might seem a little wrong, but keeping in mind that project--list is about having a list of projects "remembered" somewhere, they're probably fine. And you could let-bind project--list somewhere at the top level in your function/command/etc, so the list is not altered in the end. > I don't need project.el to specifically remember these projects; they'll > be remembered automatically as users use them, and completing-read will > nicely deduplicate the project roots anyway. We could add some var like project-list-no-write, so that dynamic changes don't get written to disk. Unless you want to keep the "dynamic" list to be used by regular commands, that is. In that case, the above will probably not suffice. We could go with your approach, or even add some project-list-sources hook. But how would the entries from different sources (e.g. the list file and your dynamic list) combined? How will they be sorted? In case we can't come up with a generic way, we could simply add a generic storage abstraction (similar to xref-history-storage), which you would override/advise to combine the lists as needed for your usage.