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.devel Subject: Re: Add cl-defgeneric project-name; first use case eglot Date: Wed, 23 Nov 2022 15:46:50 +0200 Message-ID: References: <86zgcll1le.fsf@stephe-leake.org> <83a64k4fru.fsf@gnu.org> <87h6yrxqga.fsf@gmail.com> <0d0c80fa-7db1-be68-0dba-a9dd466d34d5@yandex.ru> <86sfiarsmw.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15991"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: =?UTF-8?Q?K=c3=a9vin_Le_Gouguec?= , Eli Zaretskii , Stephen Leake , emacs-devel@gnu.org, joaotavora@gmail.com To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 23 14:47:27 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 1oxq63-0003wd-BG for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Nov 2022 14:47:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxq5a-0000RF-7M; Wed, 23 Nov 2022 08:46:58 -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 1oxq5Y-0000MG-R6 for emacs-devel@gnu.org; Wed, 23 Nov 2022 08:46:56 -0500 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxq5W-0003nr-V3; Wed, 23 Nov 2022 08:46:56 -0500 Original-Received: by mail-wr1-x42f.google.com with SMTP id s5so12269741wru.1; Wed, 23 Nov 2022 05:46:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=dv3ieMekJ4rjzlikGrKiHL+VimYz8RUufybNC4bikK8=; b=CwDFPSK7G/ztXku32snma2Zgsa4YMNK6xIr4TmaPiSFdcbT3MMNhXUFPcUBCTGcLex UAggUsfXqNloOV/hV+fHZMaMEVZ0dzmW8Is4uataGzfkyMwRN14L06EIK+owuiUjDUU+ ovCnGg9ZGcdBZQLJKTV6z5FVGaO7PAq9GwL55yoxJHX9JiAYx0PZik2BXzx5t4kLRD9+ 3huJVl2gxJ5+4Qjyi5pDn4h3Kc2jW3VSedTdCzkC5ekntLdDGr5+hR/lmp/PQwrAdjTf XMEMEl2d/xX/MAvoCahB0nuU52VwB8JF4mQy2J0dfgEZUYeP7ZjJbWLd0BWtBXp1uucb YwSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dv3ieMekJ4rjzlikGrKiHL+VimYz8RUufybNC4bikK8=; b=WjaNl29Pcucdqg3dfKl3C8z3XuhZiyQtpuyXAJZrRPD8r3uoeP6J4vwPpKmlN4XZ8t NQAen02yteOzaYlgiQLz5WxZV4PW7Bdo4MByHSIZtwX/h2pq0Av2mo5pkQEFdoozeIhx Bw+2QmLzFltHcmyEwuyf5PoeGZ/nGWWJIezjYsoy4gUqggBms5Ejw3+v2P49TAPFM5O6 xmkeYjaF5/9rPheT+Ds2PGaDHY3kOc6R7MMErJh9D6KhitDSoiN+RUL5GIjUylPI98lE BBtomvmQkFDOQio/HUexUB0iwhIzftehCpbbuiaSfZ26hLAm957fBF+GUibGSxejH3L3 If/Q== X-Gm-Message-State: ANoB5pl3GtIJbH9eHDsdckUr9TVLhymR4te3dqzOwAJXKyj5Xs4LTz4G /W4ZO5YNGAVGbkiRVNC6mBA= X-Google-Smtp-Source: AA0mqf6a8tnxT+40DXHNAUcLi1eqySawEtQGor2EnS5aw57uWDyOx/gB+odRKsefu8dDNDqgsotnCg== X-Received: by 2002:a5d:67d0:0:b0:241:781e:606 with SMTP id n16-20020a5d67d0000000b00241781e0606mr17376371wrw.216.1669211212816; Wed, 23 Nov 2022 05:46:52 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id j28-20020a5d453c000000b00241f632c90fsm950042wra.117.2022.11.23.05.46.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Nov 2022 05:46:52 -0800 (PST) Content-Language: en-US In-Reply-To: <86sfiarsmw.fsf@mail.linkov.net> Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.173, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:300393 Archived-At: On 23/11/22 10:33, Juri Linkov wrote: >>> (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")) ...) I'm not sure it's a good idea because a) That breakes the idea that every project type decides things (e.g. Projectile has projectile-project-name[-function]). b) This file is transient. It should be allowed to clear off the projects that haven't been used for a while (or just all but 10-20 most recently used ones), and if the file contains important info, we won't be allowed to do that automatically.