From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Add cl-defgeneric project-name; first use case eglot Date: Wed, 23 Nov 2022 10:33:15 +0200 Organization: LINKOV.NET Message-ID: <86sfiarsmw.fsf@mail.linkov.net> References: <86zgcll1le.fsf@stephe-leake.org> <83a64k4fru.fsf@gnu.org> <87h6yrxqga.fsf@gmail.com> <0d0c80fa-7db1-be68-0dba-a9dd466d34d5@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9055"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: =?iso-8859-1?Q?K=E9vin?= Le Gouguec , Eli Zaretskii , Stephen Leake , emacs-devel@gnu.org, joaotavora@gmail.com To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 23 09:41:37 2022 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 1oxlK4-00027n-Bm for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Nov 2022 09:41:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxlJM-0003PH-9A; Wed, 23 Nov 2022 03:40:52 -0500 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 1oxlJ5-0003LV-Ui for emacs-devel@gnu.org; Wed, 23 Nov 2022 03:40:37 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxlJ2-0005ZS-Qb; Wed, 23 Nov 2022 03:40:34 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 21705FF810; Wed, 23 Nov 2022 08:40:25 +0000 (UTC) In-Reply-To: <0d0c80fa-7db1-be68-0dba-a9dd466d34d5@yandex.ru> (Dmitry Gutov's message of "Wed, 23 Nov 2022 04:34:19 +0200") Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300383 Archived-At: >> (1) C-x p p emacs TAB is currently rather crowded, because I stuff a lot >> of things under ~/src/emacs: emacs.git worktrees, elpa.git, upstream >> repos for *ELPA packages… >> If I could "name" projects such that only emacs.git worktrees included >> the string "emacs" (rather than all repos under ~/src/emacs), that'd >> make completion more efficient. > > You're welcome to experiment with project-prompt-project-dir's code. But > note that until now that function didn't require to "materialize" project > instances for every entry, it just works off saved directory names. > > The feature you have in mind seems to require fetching a project instance > for every dir and calling 'project-name' on it. The apparent #1 gotcha > would be with remote filesystems where connection is slow/impossible, but > it might be possible to skip those when computing the names. It's possible to add projects names to project--list that it saved in ~/.emacs.d/projects, e.g. '(("~/project/dir/" (name . "Project name")) ...)